Пример #1
0
    /* Fin click de ajustes */

    /* Inicio click de misiones */

    /* Abre la pantalla de misiones, carga las misiones activas y sitúa su descripción en los textos de la pantalla */
    public void QuestsBt()
    {
        mainMenu.SetActive(false);
        player.SetActive(false);
        questsMenu.SetActive(true);
        currentWindow = 4;

        Quest[] quests = QuestLoader.GetActiveQuests();

        mission1Text.text   = "Mission: " + quests[0].description;
        mission1Reward.text = "Reward: " + quests[0].reward.ToString();
        if (DataManager.GetMissionCompleted(0))
        {
            mission1Complete.gameObject.SetActive(true);
        }
        else
        {
            mission1Complete.gameObject.SetActive(false);
        }

        mission2Text.text   = "Mission: " + quests[1].description;
        mission2Reward.text = "Reward: " + quests[1].reward.ToString();
        if (DataManager.GetMissionCompleted(1))
        {
            mission2Complete.gameObject.SetActive(true);
        }
        else
        {
            mission2Complete.gameObject.SetActive(false);
        }

        mission3Text.text   = "Mission: " + quests[2].description;
        mission3Reward.text = "Reward: " + quests[2].reward.ToString();
        if (DataManager.GetMissionCompleted(2))
        {
            mission3Complete.gameObject.SetActive(true);
        }
        else
        {
            mission3Complete.gameObject.SetActive(false);
        }
    }