// Use this for initialization void Start() { _emptyHologram = GetComponentInChildren <SphereCollider>(); _purchaseManager = FindObjectOfType <PurchaseManager>(); _uiManager = FindObjectOfType <UiManager>(); SetText(); if (_empty) { TurnIntoEmpty(); } else { TurnIntoObject(); } }
private void Awake() { if (Instance == null) { Instance = this; } else { Debug.Log("Warning: multiple " + this + " in scene!"); } playerMovement = FindObjectOfType <PlayerMovement>(); elementalShield = FindObjectOfType <ElementalShield>(); // init all relevant UI controls fireMunitionImage = GameObject.FindGameObjectWithTag("fireMunitionImage").GetComponent <Image>(); waterMunitionImage = GameObject.FindGameObjectWithTag("waterMunitionImage").GetComponent <Image>(); grassMunitionImage = GameObject.FindGameObjectWithTag("grassMunitionImage").GetComponent <Image>(); fireMunitionInventoryCount = GameObject.FindGameObjectWithTag("fireMunitionInventoryCount").GetComponent <TextMeshProUGUI>(); grassMunitionInventoryCount = GameObject.FindGameObjectWithTag("grassMunitionInventoryCount").GetComponent <TextMeshProUGUI>(); waterMunitionInventoryCount = GameObject.FindGameObjectWithTag("waterMunitionInventoryCount").GetComponent <TextMeshProUGUI>(); }
private void Start() { _uiManager = GetComponent <UiManager>(); _quiz = Quiz.CreateFrom(Questions); SetNewQuestion(); }