public void IteractWithSlot() { Cursor_scr Cursor = GameObject.Find("Cursor").GetComponent <Cursor_scr>(); if (CanCraft) { GameObject Inventory = GameObject.Find("InventoryManager"); if (!Cursor.HandContainerFull) { //Debug.Log(CraftItem); Cursor.CursorContainerActivation(CraftItem, CraftItemCount); if (InventoryComponent == null) { InventoryComponent = Inventory.GetComponent <Inventory_scr>(); } InventoryComponent.TakeItem(CraftItemComponent); } else if (Cursor.HandContainer == CraftItemComponent.id) { Cursor.CursorContainerActivation(CraftItemCount); InventoryComponent.TakeItem(CraftItemComponent); } InventoryComponent.CraftSlotsCheker(); } else { GameObject.Find("NewDropPanel").GetComponent <LeftUpShowPanel_scr>().CheckRecepy(CraftItem); Debug.Log("Для сотворения чего-то не хватает"); } }
void Start() { //Cursor = GameObject.Find("Cursor"); Inventory = GameObject.Find("InventoryManager").GetComponent <Inventory_scr>(); InventoryFull = Inventory.isFull; //ChangeInHand(CurrInvSlot); PlayerSprite = this.gameObject.GetComponent <SpriteRenderer>(); audioController = this.gameObject.GetComponent <AudioManager>(); }
void Start() { Inventory = GameObject.Find("InventoryManager").GetComponent <Inventory_scr>(); }
void Start() { InventoryComponent = Inventory.GetComponent <Inventory_scr>(); //Inventory = GameObject.Find("Inventory"); }