Guest User

Untitled

a guest
May 1st, 2016
51
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class Colt : MonoBehaviour
  5. {
  6. private int[] guns;
  7.  
  8. public GameObject gun;
  9.  
  10.  
  11. void OnTriggerEnter(Collider other)
  12. {
  13. guns[0] = GetComponent<PlayerGuns>().guns[0];
  14. if(guns[0] == 0 && (other.gameObject.tag == "Player"))
  15. {
  16. Destroy(this.gameObject);
  17. Debug.Log ("object");
  18. }
  19. }
  20. }
RAW Paste Data Copied