private void OnTriggerExit(Collider other)
 {
     if (other.gameObject.GetComponent <Bigfoot>() != null)
     {
         occupiedState = OccupiedState.Empty;
     }
 }
Beispiel #2
0
 public void AddActivity(OccupiedState activity)
 {
     activities.Add(activity);
     activities.Sort((a, b) => {
         return(b.priority.CompareTo(a.priority));
     });
 }
Beispiel #3
0
    public OccupiedState PopActivity()
    {
        int           index    = activities.Count - 1;
        OccupiedState activity = activities[index];

        activities.RemoveAt(index);
        return(activity);
    }
 private void OnTriggerStay(Collider other)
 {
     if (other.gameObject.tag != "IgnoreProjectileCollision")
     {
         if (other.gameObject.GetComponent <Bigfoot>() != null)
         {
             occupiedState = OccupiedState.Occupied;
         }
     }
 }
Beispiel #5
0
 public void NextActivity()
 {
     if (stateMachine.CurrentState == null && activities.Count > 0)
     {
         OccupiedState nextActivity = PopActivity();
         if (!stateMachine.Begin(nextActivity))
         {
             NextActivity();
             activities.Add(nextActivity);
         }
     }
 }