private void OnActivate() { switch (powerUpType) { case PowerUpType.ExtraLife: { pickupManager.AddLife(); break; } } if (activateParticles != null) { GameObject.Instantiate(activateParticles, this.transform.position, Quaternion.identity); } Destroy(this.gameObject); }