Advertisement
Guest User

Untitled

a guest
Feb 12th, 2017
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Projectile : MonoBehaviour {
  6.  
  7.     void OnCollisionEnter(Collision collision)
  8.     {
  9.         if (collision.gameObject.tag == "Block")
  10.         {
  11.             GameObject.Destroy(collision.gameObject);
  12.             GameObject.Destroy(gameObject);
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement