Ejemplo n.º 1
0
 void Start()
 {
     gm = GameModeManager.getInstance();
     pm = PauseMenuManager.getInstance();
     rm = ResourceManager.getResourceManager();
     Menus.Add("info", GameObject.FindGameObjectWithTag("InfoMenu").GetComponent <RectTransform>());
     Menus.Add("research", GameObject.FindGameObjectWithTag("ResearchMenu").GetComponent <RectTransform>());
     Menus.Add("system", GameObject.FindGameObjectWithTag("SystemMenu").GetComponent <RectTransform>());
     Menus.Add("map", GameObject.FindGameObjectWithTag("MapMenu").GetComponent <RectTransform>());
     Menus.Add("inventory", GameObject.FindGameObjectWithTag("InventoryMenu").GetComponent <RectTransform>());
     music = GameObject.FindGameObjectWithTag("music").GetComponent <AudioSource>();
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     im           = InventoryManager.GetInstance();
     po           = projectileOriginator.GetComponent <ProjectileOriginator> ();
     myRB         = GetComponent <Rigidbody2D>();
     myRenderer   = GetComponent <SpriteRenderer> ();
     myAnim       = GetComponent <Animator> ();
     box          = GetComponent <BoxCollider2D> ();
     footing      = GetComponent <CircleCollider2D> ();
     am           = GameObject.FindGameObjectWithTag("AudioManager").GetComponent <AudioManager>();
     projManager  = new ProjectileManager();
     rm           = ResourceManager.getResourceManager();
     gm           = GameModeManager.getInstance();
     initialSpeed = maxSpeed;
     asrc         = GetComponent <AudioSource> ();
     pickupSnd    = asrc.clip;
     jumpingSnd   = Resources.Load <AudioClip>("jumping");
     landingSnd   = Resources.Load <AudioClip>("landing");
 }
Ejemplo n.º 3
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();
 }
Ejemplo n.º 4
0
 void Start()
 {
     gm = GameModeManager.getInstance();
 }