Esempio n. 1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag(Tag))
     {
         EventDispatcher.Dispatch(MissionEvent.Prepare(Mission, StateToSet));
         OnTrigger.Invoke();
         gameObject.SetActive(false);
     }
 }
Esempio n. 2
0
 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;
         }
     }
 }
Esempio n. 3
0
        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();
                }


            }
        }