示例#1
0
    public void UpdateGUI()
    {
        swordAmount.text  = sword.GetAmount().ToString();
        axeAmount.text    = axe.GetAmount().ToString();
        gunnerAmount.text = gunner.GetAmount().ToString();
        looterAmount.text = looter.GetAmount().ToString();

        BattleCost.text  = "x" + (costToBattle).ToString();
        lossText.text    = loss;
        rewardsText.text = reward;
    }
示例#2
0
    void Update()
    {
        totalCost = (sword.GetAmount() * sword.GetPrice()) + (axe.GetAmount() * axe.GetPrice()) + (gunner.GetAmount() * gunner.GetPrice()) + (looter.GetAmount() * looter.GetPrice());
        UpdateGUI();
        if (toggleVar == 1)
        {
            DialogueBox.SetActive(true);
            showMenuScript.PrintText();
            if (showMenuScript.isDone == true)
            {
                MenuBox.SetActive(true);
                ShowMenu();

                Cursor.visible   = true;
                Cursor.lockState = CursorLockMode.None;
            }
        }
        else
        {
            DialogueBox.SetActive(false);
            MenuBox.SetActive(false);
        }
    }