예제 #1
0
    private void UpdateUpgradeButtons()
    {
        upgradeBatchSizeText.text = "N/A";
        upgradeLuckText.text      = GameOperations.BigIntToString(printer.LuckUpgradeCost);
        upgradeCapacityText.text  = GameOperations.BigIntToString(printer.CapacityUpgradeCost);

        // batch size
        upgradeBatchSizeButton.gameObject.SetActive(false);

        // luck
        if (printer.LuckCurrentLevel == printer.LuckMaxLevel || pawnStatus.Money < printer.LuckUpgradeCost)
        {
            upgradeLuckButton.interactable = false;
            if (printer.LuckCurrentLevel == printer.LuckMaxLevel)
            {
                upgradeLuckText.text = "Max Level";
            }
        }
        else
        {
            upgradeLuckButton.interactable = true;
        }

        // capacity
        if (printer.CapacityCurrentLevel == printer.CapacityMaxLevel || pawnStatus.Money < printer.CapacityUpgradeCost)
        {
            upgradeCapacityButton.interactable = false;
            if (printer.CapacityCurrentLevel == printer.CapacityMaxLevel)
            {
                upgradeCapacityText.text = "Max Level";
            }
        }
        else
        {
            upgradeCapacityButton.interactable = true;
        }

        // Trade In Updates
        currentPrinterImage.sprite = printer.GetPrinterSprite();
        nextPrinterImage.sprite    = printer.GetNextPrinter().GetPrinterSprite();
    }
예제 #2
0
    public void InitializePopUp(TicketPrinter printer)
    {
        pawnStatus               = PawnManager.ReadPawnStatus();
        this.printer             = printer;
        nextPrinter              = printer.GetNextPrinter();
        nextPrinter.PrinterIndex = this.printer.PrinterIndex;

        popUp.SetActive(true);
        printerImage.sprite = nextPrinter.GetPrinterSprite();
        priceText.text      = "This Will Cost:\n$" + GameOperations.BigIntToString(nextPrinter.PurchasePrice);

        if (pawnStatus.Money < nextPrinter.PurchasePrice)
        {
            yesButton.interactable = false;
        }
        else
        {
            yesButton.interactable = true;
        }

        InitializeUpgradeBars();
    }