Skip to content

Instantly share code, notes, and snippets.

@nabesi777
Created September 19, 2018 00:43
Show Gist options
  • Save nabesi777/96190e59947418cbe358cdc49a2cb9b5 to your computer and use it in GitHub Desktop.
Save nabesi777/96190e59947418cbe358cdc49a2cb9b5 to your computer and use it in GitHub Desktop.
DestoyBullet C# Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DestoyBullet : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnCollisionEnter(Collision collision)
{  //"Projectle"のタグを持つオブジェクトと衝突すると
if (collision.gameObject.tag=="Projectle")
{  //ゲームオブジェクトは消滅すつ
Destroy(collision.gameObject);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment