Example #1
0
 protected void NotifyCompletion(Mission completedMission)
 {
     if (MissionComplete != null)
     {
         MissionComplete(completedMission);
     }
 }
Example #2
0
 public void AddMission(Mission mission)
 {
     missions.Add(mission);
     mission.MissionComplete += OnMissionComplete;
     if (!HasActiveMission)
     {
         ActivateMission(mission);
     }
 }
Example #3
0
 private void OnMissionComplete(Mission completedMission)
 {
     if (completedMission == tutorialMissions.Peek())
     {
         tutorialMissions.Dequeue().MissionComplete -= OnMissionComplete;
     }
     if (tutorialMissions.Count > 0)
     {
         MissionManager.Instance.AddMission(tutorialMissions.Peek());
     }
 }
Example #4
0
        private void ActivateMission(Mission mission)
        {
            CurrentMission = mission;
            mission.OnActivate();

            // NOTE: if mission.Title is "", it's a "fake mission", i.e. some event
            // which needs to be triggered during the tutorial (e.g. ActivateObject)
            if (mission.Title.Length > 0) {
                if (!missionPanel.activeSelf)
                    missionPanel.SetActive(true);

                missionPanel.SendMessage("SetTitle", mission.Title);
                missionPanel.SendMessage("SetDescription", mission.Description);
            }
        }
Example #5
0
 private void OnMissionComplete(Mission mission)
 {
     mission.OnAccomplished();
     mission.MissionComplete -= OnMissionComplete;
     missions.Remove(mission);
     if (missions.Count > 0)
     {
         ActivateMission(missions[0]);
     }
     else
     {
         CurrentMission = null;
         if (missionPanel != null)
        	    missionPanel.SetActive(false);
     }
 }
Example #6
0
 private void OnSubMissionComplete(Mission mission)
 {
 }
Example #7
0
 public void AddSubMission(Mission mission)
 {
     //some stuff...
     mission.MissionComplete += OnSubMissionComplete;
 }
Example #8
0
 private void OnSubMissionComplete(Mission mission)
 {
 }
Example #9
0
 public void AddSubMission(Mission mission)
 {
     //some stuff...
     mission.MissionComplete += OnSubMissionComplete;
 }