Esempio n. 1
0
 public void Init(SimGame game)
 {
     this.game = game;
     CurrentI  = -1;
     if (Pms != null)
     {
         for (int i = 0; i < Pms.Length; ++i)
         {
             if (Pms[i] != null)
             {
                 if (game.OnboardPokemons[playerIndex] != null)
                 {
                     Pms[i].Init(game, game.OnboardPokemons[playerIndex]);
                 }
                 else
                 {
                     Pms[i].Init(game, game.OnboardPokemons[i]);
                 }
                 if (CurrentI == -1)
                 {
                     CurrentI = i;
                 }
             }
         }
     }
     input = new ActionInput(game.Settings.Mode.OnboardPokemonsPerPlayer());
 }
Esempio n. 2
0
 protected SimOnboardPokemon GetOnboardPokemon(SimGame game, int id)
 {
     foreach (var p in game.OnboardPokemons)
     {
         if (p != null && p.Id == id)
         {
             return(p);
         }
     }
     return(null);
 }
Esempio n. 3
0
 public virtual void Update(SimGame game)
 {
 }
Esempio n. 4
0
 protected SimPokemon GetPokemon(SimGame game, int id)
 {
     return(game.Pokemons.ValueOrDefault(id));
 }
Esempio n. 5
0
 public void Init(SimGame game, SimOnboardPokemon pm)
 {
     Game = game;
     Pm   = pm;
 }