private static void DamageShip(SimpleSprite opponent, int amount) { if (opponent is OpponentShip) { OpponentShip opp = opponent as OpponentShip; opp.health--; } }
public static void AddObject(SimpleSprite newObject, List<SimpleSprite> list) { list.Add(newObject); }
public static void RemoveObject(SimpleSprite oldObject, List<SimpleSprite> list) { if (list.Contains(oldObject)) { list.Remove(oldObject); } }