Created
September 19, 2018 00:43
-
-
Save nabesi777/96190e59947418cbe358cdc49a2cb9b5 to your computer and use it in GitHub Desktop.
DestoyBullet C# Unity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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