Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class collide : MonoBehaviour {
  6.  
  7. // Use this for initialization
  8. void Start () {
  9.  
  10. }
  11.  
  12. // Update is called once per frame
  13. void Update () {
  14. Debug.Log("hello");
  15. }
  16. void OnCollisionEnter(Collision other)
  17. {
  18. if (other.gameObject.tag =="Player")
  19. {
  20. Debug.Log("hit");
  21. //GameObject.FindGameObjectWithTag("GameController").GetComponent<coinManager>().CoinUp(CoinValue);
  22. //Instantiate(pr,transform.position,transform.rotation);
  23. //Destroy(pr.gameObject,10f);
  24. Destroy(gameObject);
  25.  
  26. }
  27. //else if(other.collider.CompareTag("Cleaner"))
  28. //{
  29. // Destroy(gameObject);
  30. // }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement