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

📄 remoteplayer.cs

📁 Beginning C# Game Programming 的源代码
💻 CS
字号:
using System;
using Microsoft.DirectX;


	/// <summary>
	/// Holds information about the other players in the game.
	/// </summary>
public class RemotePlayer
{
	int playerID;
	string hostName;
	Vector3 startingPosition;
	DateTime updateTime;			// last tick count at update
	bool active = true;				// is this player active

	public RemotePlayer(int playerID, string hostName)
	{
		this.playerID = playerID;
		this.hostName = hostName;
	}

	public override string ToString()
	{
		return hostName;
	}

	public Vector3 StartingPosition
	{
		get
		{
			return startingPosition;
		}
		set
		{
			startingPosition = value;
		}
	}

	public string HostName
	{
		get
		{
			return hostName;
		}
		set
		{
			hostName = value;
		}
	}

	public int PlayerID
	{
		get
		{
			return playerID;
		}
		set
		{
			playerID = value;
		}
	}
		
	public DateTime UpdateTime
	{
		get
		{
			return updateTime;
		}
		set
		{
			updateTime = value;
		}
	}

	public bool Active
	{
		get
		{
			return active;
		}
		set
		{
			active = value;
		}
	}

}

⌨️ 快捷键说明

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