void Start() { // TODO: // pause = GetComponent <Something> (); elementToSelectorGameObjectDict = new Dictionary <Elements.elemEnum, GameObject>(); elementToHandSpriteDict = new Dictionary <Elements.elemEnum, Sprite>(); fireLevelController = FindObjectOfType <FireLevelController>(); waterLevelController = FindObjectOfType <WaterLevelController>(); earthLevelController = FindObjectOfType <EarthLevelController>(); windLevelController = FindObjectOfType <WindLevelController>(); elementToSelectorGameObjectDict = new Dictionary <Elements.elemEnum, GameObject>(); elementToSelectorGameObjectDict.Add(Elements.elemEnum.none, null); elementToSelectorGameObjectDict.Add(Elements.elemEnum.fire, fireSelector); elementToSelectorGameObjectDict.Add(Elements.elemEnum.water, waterSelector); elementToSelectorGameObjectDict.Add(Elements.elemEnum.earth, earthSelector); elementToSelectorGameObjectDict.Add(Elements.elemEnum.wind, windSelector); elementToHandSpriteDict.Add(Elements.elemEnum.none, emptyHandSprite); elementToHandSpriteDict.Add(Elements.elemEnum.fire, fireHandSprite); elementToHandSpriteDict.Add(Elements.elemEnum.water, waterHandSprite); elementToHandSpriteDict.Add(Elements.elemEnum.earth, earthHandSprite); elementToHandSpriteDict.Add(Elements.elemEnum.wind, windHandSprite); }
// Start is called before the first frame update void Start() { p1Production = island1.GetComponentInChildren <ProductionController>(); p2Production = island2.GetComponentInChildren <ProductionController>(); p1WaterLevel = island1.GetComponent <WaterLevelController>(); p2WaterLevel = island2.GetComponent <WaterLevelController>(); musicController = GetComponent <MusicController>(); }
private void Awake() { corkManager = transform.GetComponentInChildren <CorkManager>(); pipeManager = transform.GetComponentInChildren <PipeManager>(); waterLevelController = transform.GetComponentInChildren <WaterLevelController>(); gameOverUI = transform.GetComponentInChildren <GameOverController>(); gameOverUI.gameObject.SetActive(false); }
private void Awake() { if (Instance != null) { Debug.LogError("Another singleton instance exists! this should not happen"); Destroy(Instance); } Instance = this; }
protected override void Start() { base.Start(); StartCoroutine(SendCollisionAfterDelay()); //playerScore = FindObjectOfType<PlayerScoreController>(); fireLevelController = FindObjectOfType <FireLevelController>(); waterLevelController = FindObjectOfType <WaterLevelController>(); earthLevelController = FindObjectOfType <EarthLevelController>(); windLevelController = FindObjectOfType <WindLevelController>(); }
protected override void Start() { base.Start(); LoopingAudioSource.Play(); gameManager = FindObjectOfType <GameManager>(); //playerScore = FindObjectOfType<PlayerScoreController>(); fireLevelController = FindObjectOfType <FireLevelController>(); waterLevelController = FindObjectOfType <WaterLevelController>(); earthLevelController = FindObjectOfType <EarthLevelController>(); windLevelController = FindObjectOfType <WindLevelController>(); nextTickTimer = Time.time; }