talmud

Start of Health

Oct 16th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Health : MonoBehaviour {
  6.  
  7.  
  8. void OnCollisionEnter(Collision collision)
  9. {
  10. if (collision.collider.CompareTag("Bullet"))
  11. {
  12. Destroy(gameObject);
  13. }
  14. }
  15. }
Add Comment
Please, Sign In to add comment