Beispiel #1
0
        private void Update()
        {
            if (LevelStateManager.LevelFinished || LevelStateManager.Paused)
            {
                return;
            }

            float powerOutput = PlayerBuildingManager.GetTotalPowerOutput();
            float powerDrain  = CityBuildingManager.GetTotalDrain();

            PowerText.text = powerOutput.ToString();
            DrainText.text = powerDrain.ToString();

            if (powerDrain == 0)
            {
                PowerFlowBar.Value = HALF_STANDARD_DEVIATION;
            }
            else
            {
                float totalPower = powerOutput - powerDrain;
                PowerFlowBar.Value = totalPower + HALF_STANDARD_DEVIATION;
            }
        }
Beispiel #2
0
 public static int GetCashflow()
 {
     return(PlayerBuildingManager.GetTotalMaintenanceCost() * -1 + CityBuildingManager.GetTotalIncome());
 }