Ejemplo n.º 1
0
        internal void killBoardObject(ControllableBoardObject obj)
        {
            Ant ant = (obj as Ant);

            if (obj.isAnt() && ant.Inventory > 0)
            {
                Sugar s = new Sugar();
                s.Coords = ant.Coords;
                s.Amount = ant.Inventory;
                BoardObjects.add(s);
            }
            BoardObjects.remove(obj);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Greift das übergebene Objekt an und fügt Schaden in Höhe der Attackpower zu. Das Objekt muss unmittelbar neben der Einheit stehen.
 /// Kann nur von Warrior-Ameisen benutzt werden.
 /// </summary>
 /// <param name="target"></param>
 /// <returns></returns>
 public virtual bool fight(ControllableBoardObject target)
 {
     throw new InvalidOperationException("Object isn't allowed to call the fight method.");
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Greift das übergebene Objekt an und fügt Schaden in Höhe der Attackpower zu. Das Objekt muss unmittelbar neben der Einheit stehen.
 /// Kann nur von Warrior-Ameisen benutzt werden.
 /// </summary>
 /// <param name="target"></param>
 /// <returns></returns>
 public virtual bool fight(ControllableBoardObject target)
 {
     throw new InvalidOperationException("Object isn't allowed to call the fight method.");
 }
Ejemplo n.º 4
0
 internal void killBoardObject(ControllableBoardObject obj)
 {
     Ant ant = (obj as Ant);
     if (obj.isAnt() && ant.Inventory > 0) {
         Sugar s = new Sugar();
         s.Coords = ant.Coords;
         s.Amount = ant.Inventory;
         BoardObjects.add(s);
     }
     BoardObjects.remove(obj);
 }