⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gamecamera.cs

📁 运用directX完成的坦克游戏雏形
💻 CS
字号:
using System; 

namespace TankGogogo.GameLogic
{
	/// <summary>
	/// GameCamera 的摘要说明。
	/// </summary>
	
	/*class Vector2D
	{
		Vector2D(float x,float y)
		{
			SetVector2D(x,y);
		}
	
		Vector2D add (Vector2D v)
		{
			return new Vector2D(this.m_x+v.m_x,this.m_y+v.m_y);		 
		}

		Vector2D minus (Vector2D v)
		{
			return new Vector2D(this.m_x-v.m_x,this.m_y-v.m_y);
		}

		Vector2D multiply (float num)
		{
			return new Vector2D(num*this.m_x,num*this.m_y);
		}

		Vector2D devide (float num)
		{
			if(num==0)
				return new Vector2D(this.m_x,this.m_y);
			else
				return new Vector2D(this.m_x/num,this.m_y/num);

		}

		float getLength()
		{
			return sqrt(m_x*m_x+m_y*m_y);
		}
		void normalize()
		{
			m_x=m_x/getLength();
			m_y=m_y/getLength();
		}

		void SetVector2D(float x,float y)
		{
			m_x=x;
			m_y=y;
		}

		float m_x=0;
		float m_y=0;
	}
*/
	public class GameCamera
	{
		public GameCamera()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
		}
		public enum CameraState
		{
			Stop,
			Move,
			MoveToTarget,
		}

		public void  Update(int deltaTick)
		{
			//TODO:
		}
		public void MoveTo(int posX, int posY)
		{

		}

		int _posX;
		int _posY;
		int _width;  //cm
		int _height; //cm
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -