Ejemplo n.º 1
0
 public bool attack(Agent a)
 {
     //this function was much more complex, but I moved all the checks to other areas
     a.hitpoints--;
     return true;
 }
Ejemplo n.º 2
0
 public virtual bool isActionable(Agent a)
 {
     return Utilities.Distance(a, this) < radius;
 }
Ejemplo n.º 3
0
 //checks if the an agent is within striking distance of the predator
 public override bool isActionable(Agent a)
 {
     if (Utilities.Distance(a, this) > Utilities.predStrike)
         return false;
     return true;
 }
Ejemplo n.º 4
0
 public bool attack(Agent a)
 {
     //this function was much more complex, but I moved all the checks to other areas
     a.hitpoints--;
     return(true);
 }