Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        int height = Mathf.FloorToInt(-playerManager.transform.position.y);

        cordinate.text = height.ToString();
        cashText.text = GameFormat.toScientificNotation(Gamemanager.main.player.cash);
    }
Esempio n. 2
0
    public string ToString()
    {
        string modifierText = "";

        for (int i = 0; i < modifiers.Count; i++)
        {
            modifierText += modifiers[i].modifierName + " Modifier: x\t" + GameFormat.toScientificNotation(modifiers[i].finalValue) + modifiers[i].format + "\n";
        }

        string text = "<b>" + type + "</b>\n" + "Base " + type + ": x\t" + GameFormat.toScientificNotation(baseValue) + format +
                      "\n" + modifierText + "Final " + type + ": x\t" + GameFormat.toScientificNotation(finalValue) + format + "\n\n";

        return(text);
    }
Esempio n. 3
0
    // Sets the UI values and returns the text, which the Text Component recieves.
    private string TextFormat(TextUIEnum textUI)
    {
        switch (textUI)
        {
        case TextUIEnum.Cash:
            carriedValue = Gamemanager.main.player.cash;
            return("$ " + GameFormat.toScientificNotation(UIValue));

        case TextUIEnum.Xp:
            carriedValue = Gamemanager.main.player.xp.currentXP;
            return("XP: " + GameFormat.toScientificNotation(UIValue) + "/" + GameFormat.toScientificNotation(Gamemanager.main.player.xp.nextXP));
        }
        return("");
    }