Example #1
0
 private bool CreatureAtTree(EnvCreatureObject creature)
 {
     foreach (GameObject tree in GameObject.FindGameObjectsWithTag("tree")) // could be many trees
     {
         if (Vector3.Distance(creature.thisCreature.transform.position, tree.transform.position) < 1f)
         {
             return(true);
         }
     }
     return(false);
 }
Example #2
0
 public EnvDistanceToOtherCreaturesObject(EnvCreatureObject otherCreature, float distance, float angle)
 {
     this.otherCreature = otherCreature;
     this.distance      = distance;
     this.angle         = angle;
 }
Example #3
0
 public EnvCreatureAction(CreatureAction action, EnvCreatureObject thisCreature)
 {
     this.action = action;
     creaturePerformingAction = thisCreature;
 }