Example #1
0
 public void SetMission(Mission mission)
 {
     mission.SetActive();
     this.priority = mission.GetPriority();
     this.mission  = mission;
     mission.AddMissionListener(this);
     SetText(mission.GetProgressRepresentation());
 }
Example #2
0
    //Корректное создание миссии
    //Только так она создастся правильно
    protected Mission InstantiateMission(Mission missionPrefab)
    {
        string  id      = (string)prefabKeyDictionary [missionPrefab];
        Mission mission = (Instantiate(missionPrefab) as Mission);

        mission.singleTransform.parent = singleTransform;
        mission.AddMissionListener(this);
        mission.SetId(id);
        mission.SetPriority(GetPriority());
        if (GlobalOptions.gameState == GameStates.GAME)
        {
            GlobalOptions.GetGuiLayer().AddMission(mission);              //notify
        }
        return(mission);
    }
Example #3
0
 public override void SetMission(Mission mission)
 {
     base.SetMission(mission);
     mission.AddMissionListener(this);
 }