Exemple #1
0
        public void Init(int index)
        {
            for (int i = 0; i < PlayerCore.Instance.cursave.missions.Count; i++)
            {
                //Debug.Log("Mission: " + PlayerCore.Instance.cursave.missions[i].name + ", status: " + PlayerCore.Instance.cursave.missions[i].status);
                if (PlayerCore.Instance.cursave.missions[i].name == missionName &&
                    PlayerCore.Instance.cursave.missions[i].status == (Mission.MissionStatus)missionStatus)
                {
                    state = ConditionState.Completed;
                    output.connection(0).body.Calculate();
                    return;
                }
            }

            OnMissionStatusChange += MissionStatus;

            state = ConditionState.Listening;
        }
Exemple #2
0
 public void DeInit()
 {
     OnMissionStatusChange -= MissionStatus;
     state = ConditionState.Uninitialized;
 }