Example #1
0
    public void SetMission()
    {
        for (int i = 0; i < 2; i++)
        {
            MissionBase mission = GameManager.gm.GetMission(i);
            missionDescription[i].text = mission.GetMissionDescription();
            missionReward[i].text      = "Reward: " + mission.reward;
            missionProgress[i].text    = mission.currentProgress + "/" + mission.max;
            if (mission.GetMissionComplete())
            {
                rewardButton[i].SetActive(true);
            }
        }

        GameManager.gm.Save();
    }
Example #2
0
    public void SetMission()                                              //definir as missions na tela
    {
        for (int i = 0; i < 2; i++)                                       //como sao 2
        {
            MissionBase mission = GameManager.gm.GetMission(i);           //chama a funçao
            missionDescription[i].text = mission.GetMissionDescription(); //vai esse texto na cena
            missionReward[i].text      = "Recompensa: " + mission.reward;
            missionProgress[i].text    = mission.progress + mission.currentProgress + " / " + mission.max;
            if (mission.GetMissionComplete())    //se ja foi completada
            {
                rewardButton[i].SetActive(true); // aparece o botao
            }
        }

        GameManager.gm.Save(); // depois que gera uma nova mission salva
    }