//Cache //static colleciton of powerup buttoms and powerups //public static void AddCharge(PowerUp powerUpToAdd) //{ // if(powerUp == powerUpToAdd) // { // AddCharge(); // } //} private void Awake() { ClickForPoints2D.powerUpEvent.AddListener(IncreaseCharge); if (scoreTracker == null) { scoreTracker = FindObjectOfType <ScoreTracker>(); } if (audioMod == null) { audioMod = GetComponentInParent <AudioMod>(); } if (audioMod == null) { Debug.Log("AudioMod cannot be found for PowerUpButton"); } //if (displayRoot == null) //{ // Transform t = transform.Find("DisplayRoot"); // if(t != null) // { // displayRoot = t.gameObject; // } //} //if (displayRoot != null) //{ // GetDisplayRoot().SetActive(false); //} }