Ejemplo n.º 1
0
    //---------------------------------------------------
    // SetDesc()
    // Sets the description for this task.
    //---------------------------------------------------
    private void SetDesc()
    {
        // set the label showing what the task entails
        ImmutableDataWellapadTask data = DataLoaderWellapadTasks.GetTask(task.TaskID);

        string strDesc = data.GetText();

        // if the task has an amount, we want to integrate that into the string
        if (task.Amount > 0)
        {
            strDesc = string.Format(strDesc, task.Amount);
        }

        label.text = strDesc;
    }
    private MiniPetGameMaster gameMasterScript;                 // Reference to minipet logic

    public void InitializeContent(string taskID, MinigameTypes type, MiniPetGameMaster gameMasterScript)
    {
        this.gameMasterScript = gameMasterScript;
        task = WellapadMissionController.Instance.GetTask(taskID);
        ImmutableDataWellapadTask missionTask = DataLoaderWellapadTasks.GetTask(task.TaskID);
        string desc = missionTask.GetText();

        if (task.Amount > 0)
        {
            desc = String.Format(desc, task.Amount);
        }
        label.text        = desc;
        spriteIcon.sprite = SpriteCacheManager.GetSprite("mapIcons" + type.ToString());
        rewardButton.SetActive(false);
        SetCheckboxSprite(true);
    }