示例#1
0
 private void OnTriggerExit(Collider other)
 {
     if (other.gameObject.GetComponent <Bigfoot>() != null)
     {
         occupiedState = OccupiedState.Empty;
     }
 }
示例#2
0
文件: Mom.cs 项目: GG-kun/mom_case
 public void AddActivity(OccupiedState activity)
 {
     activities.Add(activity);
     activities.Sort((a, b) => {
         return(b.priority.CompareTo(a.priority));
     });
 }
示例#3
0
文件: Mom.cs 项目: GG-kun/mom_case
    public OccupiedState PopActivity()
    {
        int           index    = activities.Count - 1;
        OccupiedState activity = activities[index];

        activities.RemoveAt(index);
        return(activity);
    }
示例#4
0
 private void OnTriggerStay(Collider other)
 {
     if (other.gameObject.tag != "IgnoreProjectileCollision")
     {
         if (other.gameObject.GetComponent <Bigfoot>() != null)
         {
             occupiedState = OccupiedState.Occupied;
         }
     }
 }
示例#5
0
文件: Mom.cs 项目: GG-kun/mom_case
 public void NextActivity()
 {
     if (stateMachine.CurrentState == null && activities.Count > 0)
     {
         OccupiedState nextActivity = PopActivity();
         if (!stateMachine.Begin(nextActivity))
         {
             NextActivity();
             activities.Add(nextActivity);
         }
     }
 }