private void OnTriggerEnter2D(Collider2D collision) // TODO: Powerup disappear ? { if (collision.CompareTag("Player")) { PlaneController player = collision.GetComponent <PlaneController>(); if (type == Type.Health) { player.RefillHealth(); } else if (type == Type.MainGun) { player.RefillMain(); } else { player.RefillSub(); } Destroy(gameObject); } }