Exemplo n.º 1
0
    private void CheckForEnding()
    {
        float greatest = 0;

        if (PlayerInventory.Money > greatest)
        {
            greatest = PlayerInventory.Money;
            win      = WinCondion.MONEY;
        }
        else if (PlayerInventory.Health > greatest)
        {
            greatest = PlayerInventory.Health;
            win      = WinCondion.HEALTH;
        }
        else if (PlayerInventory.Social > greatest)
        {
            greatest = PlayerInventory.Social;
            win      = WinCondion.SOCIAL;
        }
        else if (PlayerInventory.Time > greatest)
        {
            greatest = PlayerInventory.Time;
            win      = WinCondion.TIME;
        }
    }
Exemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        win = WinCondion.START;
        CheckForEnding();
        switch (win)
        {
        case WinCondion.START:
            EndingString = YouValuedTime;
            break;

        case WinCondion.HEALTH:
            EndingString = YouValuedHealth;
            break;

        case WinCondion.MONEY:
            EndingString = YouValuedMoney;
            break;

        case WinCondion.SOCIAL:
            EndingString = YouValuedSocial;
            break;

        case WinCondion.TIME:
            EndingString = YouValuedTime;
            break;

        default:
            break;
        }
        Final.text = introString + EndingString + LastStats;
    }