private void OnTriggerEnter(Collider other) { switch (other.gameObject.tag) { case Tags.POWERUP: Powerup powerup = other.GetComponent <Powerup>(); powerup.ApplyPowerupEffect(); powerup.Relocate(); break; default: // Nothing to do! break; } }
private void OnTriggerEnter(Collider other) { switch (other.gameObject.tag) { case Tags.POWERUP: Powerup powerup = other.GetComponent <Powerup>(); powerup.ApplyPowerupEffect(); powerup.Relocate(); break; default: // Nothing to do! break; } }