Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class Colt : MonoBehaviour
- {
- private int[] guns;
- public GameObject gun;
- void OnTriggerEnter(Collider other)
- {
- guns[0] = GetComponent<PlayerGuns>().guns[0];
- if(guns[0] == 0 && (other.gameObject.tag == "Player"))
- {
- Destroy(this.gameObject);
- Debug.Log ("object");
- }
- }
- }
RAW Paste Data
Copied