コード例 #1
0
    void minigameCostChange(float newCost_inPorc, string effectTxt, float duration, eventStatus.minigame minigameType)
    {
        PlayerPrefs.SetString("eventEffect", effectTxt);

        //quando essa string nao existir mais o minigame volta para o custo standart
        GameObject.Find("MinigameManager").GetComponent <MinigameSceneManager>().friendHelp(newCost_inPorc, minigameType);
        PlayerPrefs.SetString("MinigameChangeCost", GameObject.Find("TimerManager").GetComponent <TimeManager>().currentTime().AddMinutes(duration).ToString());
    }
コード例 #2
0
    public void changeStandart(float valueChange_inPorc, eventStatus.minigame minigameToChange)
    {
        if (minigameToChange == eventStatus.minigame.all)
        {
            foreach (var aux in minigameTypes)
            {
                aux.caffeineStandartCost *= (100 - valueChange_inPorc) / 100;
            }
        }

        resetAndResetCaffeineCost(_stageManager.getActualStageStatus().stageName);
    }
コード例 #3
0
    public void friendHelp(float valueChange_inPorc, eventStatus.minigame minigameToChange)
    {
        if (minigameToChange == eventStatus.minigame.all)
        {
            foreach (var aux in minigameTypes)
            {
                aux.changeWithFriend = valueChange_inPorc;
            }
        }

        resetAndResetCaffeineCost(_stageManager.getActualStageStatus().stageName);
    }
コード例 #4
0
    public void addDictionaryCost(float valueChange_inPorc, eventStatus.minigame minigameToChange, string stage)
    {
        if (minigameToChange == eventStatus.minigame.all)
        {
            foreach (var aux in minigameTypes)
            {
                if (aux.changeCostStage.ContainsKey(stage))
                {
                    aux.changeCostStage[stage] += valueChange_inPorc;
                }
                else
                {
                    aux.changeCostStage.Add(stage, valueChange_inPorc);
                }
            }
        }

        if (minigameToChange == eventStatus.minigame.cleaning)
        {
            foreach (var aux in cleaningMinigame)
            {
                if (aux.changeCostStage.ContainsKey(stage))
                {
                    aux.changeCostStage[stage] += valueChange_inPorc;
                }
                else
                {
                    aux.changeCostStage.Add(stage, valueChange_inPorc);
                }
            }
        }

        if (minigameToChange == eventStatus.minigame.nutrients)
        {
            foreach (var aux in nutrientsMinigame)
            {
                if (aux.changeCostStage.ContainsKey(stage))
                {
                    aux.changeCostStage[stage] += valueChange_inPorc;
                }
                else
                {
                    aux.changeCostStage.Add(stage, valueChange_inPorc);
                }
            }
        }

        if (minigameToChange == eventStatus.minigame.water)
        {
            foreach (var aux in waterMinigame)
            {
                if (aux.changeCostStage.ContainsKey(stage))
                {
                    aux.changeCostStage[stage] += valueChange_inPorc;
                }
                else
                {
                    aux.changeCostStage.Add(stage, valueChange_inPorc);
                }
            }
        }

        resetAndResetCaffeineCost(_stageManager.getActualStageStatus().stageName);
    }