示例#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);
        }
示例#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);
        }
示例#3
0
 public void PlayerChangedWeapon(FantasyFighterPlayer player)
 {
     FantasyFighterWeapon msg = new FantasyFighterWeapon(player.fighter.ID, player.fighter.weapon);
 }