public void registerMonster(FarmMonster monster) { if (!currentMonsters.Contains(monster)) { currentMonsters.Add(monster); } }
internal void cleanUpMonsters() { if (currentMonsters == null) { return; } for (int i = currentMonsters.Count - 1; i >= 0; --i) { FarmMonster monster = currentMonsters[i]; if (monster.Health <= 0 || (monster.currentLocation != null && !monster.currentLocation.characters.Contains(monster))) { monster.processDeath(); currentMonsters.RemoveAt(i); } } }