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()); }
protected SimOnboardPokemon GetOnboardPokemon(SimGame game, int id) { foreach (var p in game.OnboardPokemons) { if (p != null && p.Id == id) { return(p); } } return(null); }
public virtual void Update(SimGame game) { }
protected SimPokemon GetPokemon(SimGame game, int id) { return(game.Pokemons.ValueOrDefault(id)); }
public void Init(SimGame game, SimOnboardPokemon pm) { Game = game; Pm = pm; }