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

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