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