Esempio n. 1
0
    public void AdviceGiven(int oceanType)
    {
        SwitchReaction(oceanType);

        float amount = currentCharacter.GetStressAmountByCategory(oceanType);

        currentCharacter.stressLevel += amount;
        if (currentCharacter.stressLevel < 0.0f)
        {
            Debug.Log("Character stressLevel ZERO!");
            currentCharacter.stressLevel = 0.0f;

            progessBar.SetFillAmount(currentCharacter.stressLevel);
            UpdateCharExpressionSprite();
            qstnMngr.EventMessage("Patient austherapiert.");
            clientsWon++;
            loadNextCharacter();
        }
        else if (currentCharacter.stressLevel > 1.0f)
        {
            Debug.Log("Character stressLevel MAXED!");
            currentCharacter.stressLevel = 1.0f;

            progessBar.SetFillAmount(currentCharacter.stressLevel);
            UpdateCharExpressionSprite();
            qstnMngr.EventMessage("Patient verloren.");
            clientsLost++;
            loadNextCharacter();
        }
        else
        {
            progessBar.SetFillAmount(currentCharacter.stressLevel);
            UpdateCharExpressionSprite();
        }
    }