private void OnTriggerExit(Collider other) { if (other.gameObject.GetComponent <Bigfoot>() != null) { occupiedState = OccupiedState.Empty; } }
public void AddActivity(OccupiedState activity) { activities.Add(activity); activities.Sort((a, b) => { return(b.priority.CompareTo(a.priority)); }); }
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; } } }
public void NextActivity() { if (stateMachine.CurrentState == null && activities.Count > 0) { OccupiedState nextActivity = PopActivity(); if (!stateMachine.Begin(nextActivity)) { NextActivity(); activities.Add(nextActivity); } } }