Guest User

Untitled

a guest
Oct 16th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Crystal : MonoBehaviour {
  6.  
  7. // Use this for initialization
  8. void Start () {
  9.  
  10. }
  11.  
  12. // Update is called once per frame
  13. void Update () {
  14.  
  15. }
  16.  
  17. void OnTriggerEnter2D(Collider2D target) {
  18. if (target.gameObject.tag == "Player") {
  19.  
  20. Destroy (gameObject);
  21.  
  22. }
  23.  
  24. }
  25.  
  26. }
Add Comment
Please, Sign In to add comment