// Update is called once per frame void OnTriggerEnter2D(Collider2D other) { if (other.name == "Player") { thePowerUpManager.ActivatePowerup(doublePts, powerupLength); } gameObject.SetActive(false); }
void OnTriggerEnter2D(Collider2D other) { if (other.name == "Player") { thePowerUpManager.ActivatePowerup(doublePoints, safeMode, shield, rocketSpeed, powerupLenght); } gameObject.SetActive(false); }
private void OnTriggerEnter2D(Collider2D other) { if (other.name == "Player") { gameObject.SetActive(false); powerUpManager.ActivatePowerup(doublePoints, safeMode, powerUpLength); } }
// When the player collides with a powerup, activate it and tell the pick up manager what type of powerup it is and how long the ability should last. private void OnTriggerEnter2D(Collider2D other) { if (other.name == "Player") { puManager.ActivatePowerup(doublePoints, safeMode, slowDown, level, gem, timer); } // then we should disable the pickup. gameObject.SetActive(false); }
public void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { thepowerupManager.ActivatePowerup(doublePoints, safeMode, powerupLength); powerupSound.Play(); } gameObject.SetActive(false); }