Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class weaponPickup : MonoBehaviour {
  6. public GameObject weaponInHand;
  7. public GameObject weaponOnground;
  8. // Use this for initialization
  9. void Start ()
  10. {
  11. weaponInHand.SetActive(false);
  12. }
  13.  
  14. // Update is called once per frame
  15. public void onTriggerEnter(Collider col)
  16. {
  17. if(col.gameObject.tag == "Player")
  18. {
  19. weaponInHand.SetActive(true);
  20. weaponOnground.SetActive(false);
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement