private void OnDestroy() { if (dropped) { Instantiate(heldPowerup, transform.position, Quaternion.identity); Debug.Log("COOL BEANS"); } else { powerup.Destroy(); } powerupLabel.text = "None"; }
public void Update() { if (hostedPowerup != null && building.isAblaze) { hostedPowerup.Destroy(); hostedPowerup = null; } if (!removed && !functional) { removed = true; SpawnSpotController.RemoveSpawner(this); } }