コード例 #1
0
    public virtual void Upgrade()
    {
        Debug.Log("UPGRADED");
        PowerSource source = FindObjectOfType <PowerSource>();

        if (source.currency > upgradeCosts[curUpgradeStage])
        {
            source.SpendPlayerCurrency(upgradeCosts[curUpgradeStage]);
            curUpgradeStage++;
        }
        else
        {
            //Invalid Action
        }
    }