static public Gym Instance(int x, int y, na_type type) { if (instance == null) { instance = new Dictionary <na_type, Gym>(); } if (!instance.ContainsKey(type)) { instance.Add(type, new Gym(x, y, type)); } return(instance[type]); }
private Gym(int x, int y, na_type type) { switch (type) { case na_type.water: Enemy.Add(new Pokemon("Magikarp", "Water", "Magikarp", 1, 8, 10, 55, null)); Enemy.Add(new Pokemon("Magikarp", "Water", "Magikarp", 1, 12, 10, 55, null)); Enemy.Add(new Pokemon("Magikarp", "Water", "Magikarp", 1, 16, 10, 55, null)); Enemy.Add(new Pokemon("Magikarp", "Water", "Magikarp", 1, 20, 10, 55, null)); break; } nature = type; x_position = x; y_position = y; pokeDefeated = 0; pokeTotal = Enemy.Count; currentPoke = Enemy[pokeDefeated]; }