Esempio n. 1
0
    public void Charge()
    {
        ColonyController colony = GameMaster.colonyController;

        if (colony.energyCrystalsCount >= 1)
        {
            if (colony.energyStored != colony.totalEnergyCapacity)
            {
                colony.GetEnergyCrystals(1);
                colony.AddEnergy(GameMaster.ENERGY_IN_CRYSTAL);
            }
        }
        else
        {
            UIController.current.MakeAnnouncement(Localization.GetAnnouncementString(GameAnnouncements.NotEnoughEnergyCrystals));
        }
    }
Esempio n. 2
0
    public void Charge()
    {
        ColonyController colony = GameMaster.realMaster.colonyController;

        if (colony.energyCrystalsCount >= 1)
        {
            if (colony.energyStored != colony.totalEnergyCapacity)
            {
                colony.GetEnergyCrystals(1);
                colony.AddEnergy(GameConstants.ENERGY_IN_CRYSTAL);
                if (GameMaster.soundEnabled)
                {
                    GameMaster.audiomaster.Notify(NotificationSound.BatteryCharged);
                }
            }
        }
        else
        {
            GameLogUI.NotEnoughMoneyAnnounce();
        }
    }