public void OnTriggerEnter(Collider other) { //プレイヤーと当たったら if (other.tag == TagName.PLAYER) { soundsManager.PlaySE("ItemGet", 6); //アイテム取得数加算 item_manger.ItemCountUp(); //アイテムタイプによってそれぞれ効果付与 switch (itemType) { case ItemType.AttackPower: playerAbility.CountUp_AttackPower(); break; case ItemType.KnockBack: playerAbility.CountUp_KnockBack(); break; case ItemType.MaxWireCount: playerAbility.CountUp_WireCount(); break; case ItemType.ResponeTime: playerAbility.CountUp_ResporneTime(); break; case ItemType.AllUp: playerAbility.CountUp_All(); break; } //矢印とアイテムを削除 Destroy(arrow); Destroy(this.gameObject); } }