Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public void PlayerChangedWeapon(FantasyFighterPlayer player)
 {
     FantasyFighterWeapon msg = new FantasyFighterWeapon(player.fighter.ID, player.fighter.weapon);
 }