Exemplo n.º 1
0
 internal Singles(Room.IUserController c)
 {
     controller = c.PlayerController;
       controller.AddEventsListener(this);
       board = c.Game.Board;
       teamPms = c.Game.Teams[controller.Player.TeamId];
       rivalPms = c.Game.Teams[1 - controller.Player.TeamId];
       selectedPanel = (int)ControlPanelIndex.INACTIVE;
       //controller.Board.MyTeam.PokemonOnBoardChanged += (sender, e) =>
       //  {
       //    if (e.NewPokemon != null) pokemonsInBall.Remove(e.NewPokemon);
       //    if (e.OldPokemon != null) pokemonsInBall.Add(e.OldPokemon);
       //  };
       //pokemonsInBall = new List<IPokemon>(controller.Player.Pokemons.Where(p => p.PositionOnBoard == null));//如果中途加载的话有可能存在正在战斗的精灵
       //this.controller_IsActiveChanged(null, null);
 }