Пример #1
0
 void OnEnable()
 {
     if (GetComponent <Inventory_Master>() != null)
     {
         inventoryMaster = GetComponent <Inventory_Master>();
     }
     else
     {
         if (GetComponent <Item_Master>().refNumber == -1)
         {
             Debug.Log("You must add a inventory master script to the player.");
         }
     }
 }
 void SetInitialReferences()
 {
     inventoryMaster = GetComponent <Inventory_Master>();
 }
Пример #3
0
 void OnEnable()
 {
     inventoryMaster = GameObject.FindGameObjectWithTag("Player").GetComponent <Inventory_Master>();
 }
Пример #4
0
 void SetInitialReferences()
 {
     inventoryMaster = GameObject.FindGameObjectWithTag("Player").GetComponent <Inventory_Master>();
 }
Пример #5
0
 void SetInitialReferences()
 {
     inventoryMaster = transform.root.GetComponent <Inventory_Master>();
 }