예제 #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;
 }
예제 #2
0
 public virtual bool isActionable(Agent a)
 {
     return Utilities.Distance(a, this) < radius;
 }
예제 #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;
 }
예제 #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);
 }