private void OnTriggerEnter(Collider other) { if (other.CompareTag(Tag)) { EventDispatcher.Dispatch(MissionEvent.Prepare(Mission, StateToSet)); OnTrigger.Invoke(); gameObject.SetActive(false); } }
private void Mission_Event(MissionEvent e) { for (int i = 0; i < Missions.Length; i++) { if (Missions[i].ID == e.Mission.ID) { Missions[i].Completion = e.State; } } }
public static MissionEvent Prepare( Mission m, MissionManager.MissionState s ) { var e = new MissionEvent(); e.Mission = m; e.State = s; return(e); }
private void Mission_Event(MissionEvent e) { if (e.Mission == Mission && e.State == State) { if (WaitForState) { StartCoroutine(WaitForGameState()); } else { OnState.Invoke(); } } }