public void RaisePowerupEvent(PowerupElement element) { if (element.PowerupEvent != null) { element.PowerupEvent.Raise(); } }
public void Start() { //var PowerupManager = FindObjectOfType<PowerupManager>(); //if (PowerupManager != null) //PowerupManager.RegisterPowerupTarget(this); if (powerupStateType == null) { int rn = UnityEngine.Random.Range(1, 7); //Debug.Log("The random powerup value was " + rn.ToString()); powerupStateType = ChooseRandomPowerup();// returns 1-6 } }