public void AddPlayer(IOnlineConnection NewPlayer) { ListOnlinePlayer.Add(NewPlayer); Player NewRoomPlayer = new Player(); NewRoomPlayer.ID = NewPlayer.ID; NewRoomPlayer.Name = NewPlayer.Name; ListRoomPlayer.Add(NewRoomPlayer); }
public void AddOnlinePlayer(IOnlineConnection NewPlayer, string PlayerType) { ListOnlinePlayer.Add(NewPlayer); Player NewRoomPlayer = new Player(NewPlayer.ID, NewPlayer.Name, PlayerType, 0); NewRoomPlayer.Equipment.CharacterType = "Jack"; NewRoomPlayer.GameplayType = GameplayTypes.None; ListRoomPlayer.Add(NewRoomPlayer); CurrentPlayerCount = (byte)ListRoomPlayer.Count; }
public void AddOnlinePlayer(IOnlineConnection NewPlayer, string PlayerType) { ListOnlinePlayer.Add(NewPlayer); BattleMapPlayer NewRoomPlayer = new BattleMapPlayer(NewPlayer.ID, NewPlayer.Name, PlayerType, true, 0, true, Color.Blue); NewRoomPlayer.OnlineClient = NewPlayer; NewRoomPlayer.GameplayType = GameplayTypes.None; ListRoomPlayer.Add(NewRoomPlayer); CurrentPlayerCount = (byte)ListRoomPlayer.Count; }
public void RemoveOnlinePlayer(int Index) { ListOnlinePlayer.RemoveAt(Index); ListRoomPlayer.RemoveAt(Index); if (ListOnlinePlayer.Count == 0) { IsDead = true; } CurrentPlayerCount = (byte)ListRoomPlayer.Count; HandleHostChange(); }
public void RemovePlayer(IOnlineConnection OnlinePlayerToRemove) { for (int P = 0; P < ListOnlinePlayer.Count; ++P) { if (ListOnlinePlayer[P] == OnlinePlayerToRemove) { ListOnlinePlayer.RemoveAt(P); ListRoomPlayer.RemoveAt(P); if (ListOnlinePlayer.Count == 0) { IsDead = true; } } } }
public void RemovePlayer(IOnlineConnection OnlinePlayerToRemove) { for (int P = 0; P < ListOnlinePlayer.Count; ++P) { if (ListOnlinePlayer[P] == OnlinePlayerToRemove) { ListOnlinePlayer.RemoveAt(P); ListRoomPlayer.RemoveAt(P); if (ListOnlinePlayer.Count == 0) { IsDead = true; } } } CurrentPlayerCount = (byte)ListRoomPlayer.Count; HandleHostChange(); }