コード例 #1
0
ファイル: ServerClient.cs プロジェクト: DrPandemic/EraParadox
		public ServerClient(NetConnection conn, ServerChampion champion)
        {
			Connection = conn;
			Champion = champion;
			ActionsPackage = new List<PlayerAction>();
			LastAcknowledgedActionID = IDGenerator.NO_ID;
			AnimData = new ChampionAnimData();
			ChampStats = new ChampionStats(100f); //TODO: depend on champion
        }
コード例 #2
0
ファイル: ServerGame.cs プロジェクト: DrPandemic/EraParadox
		static void FillChampionInfo(NetBuffer msg, ICharacter champion, ChampionStats stats)
		{
			ulong id = champion.ID;
			float x = champion.Position.X;
			float y = champion.Position.Y;
			byte type = (byte)champion.Type;
			bool team = champion.Team == Teams.Left;
			float maxhp = stats.MaxHealth;
			float hp = stats.Health;

			msg.Write(id);
			msg.Write(x);
			msg.Write(y);
			msg.Write(type);
			msg.Write(team);
			msg.Write(maxhp);
			msg.Write(hp);
		}