Exemplo n.º 1
0
        public void UpgradePowerUp(PowerUpTypes powerUpType)
        {
            // Can't upgrade if the player can't afford the power up
            int cost = dataManager.GetPowerUpCost(powerUpType);

            if (dataManager.GetTotalCoins(true) < cost)
            {
                return;
            }
            dataManager.UpgradePowerUp(powerUpType);
            dataManager.AdjustTotalCoins(-cost, true);
        }