private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "OutZone") { Death(); } else if (other.GetComponent <PowerUpType>()) { if (other.GetComponent <PowerUpType>().state == PowerupType.COIN) { Destroy(other.gameObject); scoreScript.AddScore(5); } else if (other.GetComponent <PowerUpType>().state == PowerupType.AMMO) { Destroy(other.gameObject); powerUpScript.AddAmmo(); } else if (other.GetComponent <PowerUpType>().state == PowerupType.SLOW) { Destroy(other.gameObject); powerUpScript.SlowMotion(); } } }