/// <summary> /// Adds a monster to the player's monsters. Initializes the list if it has not been already. /// </summary> /// <param name="monsterToAdd">The monster to add.</param> public void AddMonster(DummyMonster monsterToAdd) { if (monsters == null) { monsters = new List <DummyMonster>(); } monsters.Add(monsterToAdd); }
/// <summary> /// Removes a monster from the player's monsters. /// </summary> /// <param name="monsterToRemove">The monster to remove.</param> /// <returns>Whether or not the given monster was able to be removed.</returns> public bool RemoveMonster(DummyMonster monsterToRemove) { // Monster list has not been initialized. Silently handle this. if (monsters == null) { return(false); } return(monsters.Remove(monsterToRemove)); }