public static FantasyArena JoinArena(FantasyFighterPlayer fighter, string name) { FantasyArena arena = GetArena(name); if (arena != null) { arena.Add(fighter); FantasyServer.lobby_fighters.Remove(fighter); } return(arena); }
void Connected(IAsyncResult iar) { ServerPort sp = iar.AsyncState as ServerPort; TcpClient client = sp.listener.EndAcceptTcpClient(iar); FantasyFighterPlayer player; FantasyServer.fighters.AddLast(player = new FantasyFighterPlayer(form.AddEvent, client)); FantasyServer.lobby_fighters.AddLast(player); form.AddEvent("New player connected..."); listener.BeginAcceptTcpClient(Connected, this); }
public void PlayerChangedWeapon(FantasyFighterPlayer player) { FantasyFighterWeapon msg = new FantasyFighterWeapon(player.fighter.ID, player.fighter.weapon); }