Ejemplo n.º 1
0
 void InitValues()
 {
     Data            = GetComponent <GameData>();
     Pause           = GetComponent <Menus>();
     Panels          = GetComponent <LightningPanel>();
     BuildingManager = GetComponent <BuildingManager>();
     SaveManager     = GetComponent <SaveManager>();
     //Debug.Log(SaveManager);
     PollutionCoeficient   = 25;
     PremiumConversionRate = 0.5f;
     MinimumPowerFlag      = 100000f;
     DoubleMoneyCost       = 10000;
     DoubleMoneyBought     = false;
     Frames = 0;
     MoneyConversionRate = 0.05f;
     ConvertUnlocked     = false;
     CleanGens           = Data.CleanEnList;
     PollutionGens       = Data.PollEnList;
     PollutionCleaners   = Data.PollCleanerList;
     if (PlayerPrefs.GetInt("HasData") == 1)
     {
         SaveManager.Awake();
         SaveManager.Load();
         //Debug.Log("WE DID IT BOIS");
     }
     else
     {
         Power           = 50f;
         Money           = 0f;
         Pollution       = 0f;
         PremiumCurrency = 0;
         MaxPowerEarned  = 0;
     }
 }