//Playerが触れた時にアイテムの効果を発動 void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { if (this.gameObject.name == "BulletPowerUp") { itemControl.BPU(); } if (this.gameObject.name == "InvisiblePlayer") { itemControl.IP(); } Destroy(this.gameObject); } }