/* Setea el último power up en la pila a activo para aplicar */ public void GetPowerUp() { var powerUp = powerUps.Pop() as GameObject; /* OBTIENE OBJETO Y REMUEVE DE LA PILA */ activePowerUp = powerUp.GetComponent <PowerUpModel>(); activePowerUp.transform.localPosition = powerUpActivePosition; }
/* Si hay un power up activado destruye el power up sin aplicarlo a un objeto */ public void DeleteActivePowerUp() { if (PowerUpIsActive()) { Destroy(activePowerUp.gameObject); activePowerUp = null; UpdateInteractableState(true); //Debug.Log($"PowerUps acumulados: {powerUps.Count}"); } }