Example #1
0
 void Start()
 {
     im = InfoMenuManager.getInstance();
     rm = ResourceManager.getResourceManager();
     cost.GetComponent <Text> ().text   = rm.GetCostOfGenerator().ToString() + " G";
     needs.GetComponent <Text> ().text  = rm.CalculatePower().ToString();
     output.GetComponent <Text> ().text = (rm.GENERATORS * (rm.POWER_EFFICIENCY * 1000)).ToString();
 }
Example #2
0
 void Start()
 {
     im         = InfoMenuManager.getInstance();
     rm         = ResourceManager.getResourceManager();
     miners     = new string[] { "A", "B", "C", "D" };
     minersDict = new Dictionary <string, GameObject> {
         { "A", GameObject.FindGameObjectWithTag("MinerAIcon") },
         { "B", GameObject.FindGameObjectWithTag("MinerBIcon") },
         { "C", GameObject.FindGameObjectWithTag("MinerCIcon") },
         { "D", GameObject.FindGameObjectWithTag("MinerDIcon") },
     };
     currentMiner = 0;
     cost.GetComponent <Text> ().text = rm.GetMinerCost(miners[currentMiner]).ToString() + " G";
 }
Example #3
0
 void Start()
 {
     im = InfoMenuManager.getInstance();
     rm = ResourceManager.getResourceManager();
     cost.GetComponent <Text> ().text = rm.GetMarketingCost().ToString() + " G";
 }
Example #4
0
 void Start()
 {
     im = InfoMenuManager.getInstance();
     rm = ResourceManager.getResourceManager();
     number.GetComponent <Text> ().text = rm.GetNeededManResources().ToString() + " EA";
 }
Example #5
0
 // Use this for initialization
 void Start()
 {
     rm     = ResourceManager.getResourceManager();
     pm     = PauseMenuManager.getInstance();
     gm     = GameModeManager.getInstance();
     im     = InfoMenuManager.getInstance();
     panels = new GameObject[] {
         (GameObject)GameObject.FindGameObjectWithTag("RawPanel"),
         (GameObject)GameObject.FindGameObjectWithTag("MinersPanel"),
         (GameObject)GameObject.FindGameObjectWithTag("RefinedPanel"),
         (GameObject)GameObject.FindGameObjectWithTag("CryptoPanel"),
         (GameObject)GameObject.FindGameObjectWithTag("InventoryPanel"),
         (GameObject)GameObject.FindGameObjectWithTag("ManufacturingPanel"),
         (GameObject)GameObject.FindGameObjectWithTag("EnergyPanel"),
         (GameObject)GameObject.FindGameObjectWithTag("MarketingPanel"),
         (GameObject)GameObject.FindGameObjectWithTag("DistributionPanel"),
         (GameObject)GameObject.FindGameObjectWithTag("RefinementPanel")
     };
     submenusDict = new Dictionary <InfoMenuManager.Panel, GameObject> {
         { InfoMenuManager.Panel.RAW, submenus[0] },
         { InfoMenuManager.Panel.MINERS, submenus[1] },
         { InfoMenuManager.Panel.REFINED, submenus[2] },
         { InfoMenuManager.Panel.CRYPTO, submenus[3] },
         { InfoMenuManager.Panel.INVENTORY, submenus[4] },
         { InfoMenuManager.Panel.MANUFACTURING, submenus[5] },
         { InfoMenuManager.Panel.ENERGY, submenus[6] },
         { InfoMenuManager.Panel.MARKETING, submenus[7] },
         { InfoMenuManager.Panel.DISTRIBUTION, submenus[8] },
         { InfoMenuManager.Panel.REFINERIES, submenus[9] },
     };
     HidePanelMenus();
     panels.ToList().ForEach(obj => obj.GetComponent <Image>().color = Color.grey);
     currentPanel = panels [currentPanelIndex];
     currentPanel.GetComponent <Image> ().color = Color.white;
     resourceALabel        = GameObject.FindGameObjectWithTag("ALabel").GetComponent <Text> ();
     resourceBLabel        = GameObject.FindGameObjectWithTag("BLabel").GetComponent <Text> ();
     resourceCLabel        = GameObject.FindGameObjectWithTag("CLabel").GetComponent <Text> ();
     resourceDLabel        = GameObject.FindGameObjectWithTag("DLabel").GetComponent <Text> ();
     resourceGLabel        = GameObject.FindGameObjectWithTag("GoldLabel").GetComponent <Text> ();
     refinedALabel         = GameObject.FindGameObjectWithTag("RefinedA").GetComponent <Text> ();
     refinedBLabel         = GameObject.FindGameObjectWithTag("RefinedB").GetComponent <Text> ();
     refinedCLabel         = GameObject.FindGameObjectWithTag("RefinedC").GetComponent <Text> ();
     refinedDLabel         = GameObject.FindGameObjectWithTag("RefinedD").GetComponent <Text> ();
     minerALabel           = GameObject.FindGameObjectWithTag("MinerA").GetComponent <Text> ();
     minerBLabel           = GameObject.FindGameObjectWithTag("MinerB").GetComponent <Text> ();
     minerCLabel           = GameObject.FindGameObjectWithTag("MinerC").GetComponent <Text> ();
     minerDLabel           = GameObject.FindGameObjectWithTag("MinerD").GetComponent <Text> ();
     inventory             = GameObject.FindGameObjectWithTag("Inventory").GetComponent <Text> ();
     generators            = GameObject.FindGameObjectWithTag("Generators").GetComponent <Text> ();
     generatorE            = GameObject.FindGameObjectWithTag("GeneratorE").GetComponent <Text> ();
     marketing             = GameObject.FindGameObjectWithTag("Marketing").GetComponent <Text> ();
     demand                = GameObject.FindGameObjectWithTag("Demand").GetComponent <Text> ();
     price                 = GameObject.FindGameObjectWithTag("Price").GetComponent <Text> ();
     factories             = GameObject.FindGameObjectWithTag("Factories").GetComponent <Text> ();
     factoryE              = GameObject.FindGameObjectWithTag("FactoryE").GetComponent <Text> ();
     factoryY              = GameObject.FindGameObjectWithTag("FactoryY").GetComponent <Text> ();
     refineries            = GameObject.FindGameObjectWithTag("Refineries").GetComponent <Text> ();
     refineryE             = GameObject.FindGameObjectWithTag("RefineryE").GetComponent <Text> ();
     refineryY             = GameObject.FindGameObjectWithTag("RefineryY").GetComponent <Text> ();
     distribution          = GameObject.FindGameObjectWithTag("Distribution").GetComponent <Text> ();
     workforce             = GameObject.FindGameObjectWithTag("Workforce").GetComponent <Text> ();
     crypto                = GameObject.FindGameObjectWithTag("Crypto").GetComponent <Text> ();
     nodes                 = GameObject.FindGameObjectWithTag("CryptoNodes").GetComponent <Text> ();
     cryptoDifficulty      = GameObject.FindGameObjectWithTag("CryptoDifficulty").GetComponent <Text> ();
     resourceALabel.text   = rm.ResourceA.ToString();
     resourceBLabel.text   = rm.ResourceB.ToString();
     resourceCLabel.text   = rm.ResourceC.ToString();
     resourceDLabel.text   = rm.ResourceD.ToString();
     resourceGLabel.text   = rm.Gold.ToString();
     refinedALabel.text    = rm.RefinedA.ToString();
     refinedBLabel.text    = rm.RefinedB.ToString();
     refinedCLabel.text    = rm.RefinedC.ToString();
     refinedDLabel.text    = rm.RefinedD.ToString();
     minerALabel.text      = rm.MinerA.ToString();
     minerBLabel.text      = rm.MinerB.ToString();
     minerCLabel.text      = rm.MinerC.ToString();
     minerDLabel.text      = rm.MinerD.ToString();
     inventory.text        = rm.WIDGET_INVENTORY.ToString();
     generators.text       = rm.GENERATORS.ToString();
     generatorE.text       = rm.POWER_EFFICIENCY.ToString();
     marketing.text        = rm.MARKETING_LEVEL.ToString();
     demand.text           = rm.DEMAND.ToString();
     price.text            = rm.BASE_PRICE.ToString();
     factories.text        = rm.FACTORIES.ToString();
     factoryY.text         = rm.PRODUCTION_BASE_YIELD.ToString();
     factoryE.text         = rm.PRODUCTION_EFFICIENCY.ToString();
     refineries.text       = rm.REFINERIES.ToString();
     refineryE.text        = rm.REFINERY_EFFICIENCY.ToString();
     refineryY.text        = rm.REFINE_BASE_YIELD.ToString();
     distribution.text     = rm.DISTRIBUTION_FORCE.ToString();
     workforce.text        = rm.WORKFORCE.ToString();
     crypto.text           = rm.CRYPTO.ToString();
     nodes.text            = rm.CRYPTO_NODES.ToString();
     cryptoDifficulty.text = rm.CRYPTO_DIFFICULTY.ToString();
 }