Advertisement
Guest User

Untitled

a guest
Aug 1st, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class CurrentItem : MonoBehaviour {
  5.  
  6. public Item currentItem;
  7.  
  8. public Item CurrentItem{
  9. get{return currentItem;}
  10. set{currentItem = value;
  11. Debug.Log(value); }
  12. }
  13.  
  14. public bool itemSelected = false;
  15.  
  16. public WeaponController weaponController;
  17.  
  18. void Start() {
  19. weaponController = this.transform.root.GetComponent<WeaponController>();
  20. }
  21.  
  22. public void addToWeaponsArray() {
  23. Debug.Log (currentItem.itemName);
  24. weaponController.AddWeapon(currentItem);
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement