Example #1
0
 // Use this for initialization
 void Start()
 {
     _GameManager  = GameObject.Find("GameManager").GetComponent <GameManager_r>();
     _UIController = GameObject.Find("UIController").GetComponent <UIController_r>();
     if (item)
     {
         GetComponent <Image>().sprite          = item.GetComponent <Item_r>().itemSprite;
         item.GetComponent <Item_r>().character = transform.parent.gameObject;
         item.GetComponent <Item_r>().slot      = gameObject;
         //if (item.GetComponent<Item_r>().character.GetComponent<Character_r>()) {
         //    item.GetComponent<Item_r>().price = 0;
         //    Debug.Log("Parent: " + transform.parent);
         //}
     }
 }
Example #2
0
 // Use this for initialization
 void Start()
 {
     _GameManager  = GameObject.Find("GameManager").GetComponent <GameManager_r>();
     _UIController = GameObject.Find("UIController").GetComponent <UIController_r>();
 }