public override void Initialise() { _equipedGrid = transform.GetChild(0); _inventoryGrid = transform.GetChild(1); _inventoryImagePrefab = Resources.Load <Script_VisualItemUI>("Prefabs/UI/ItemInventoryImage"); _currencyText = transform.GetChild(2).GetComponent <Text>(); }
public void SwitchItemInventoryList(Script_VisualItemUI item) { if (item == null) { return; } if (item.transform.parent == _equipedGrid) { item.transform.SetParent(_inventoryGrid); } else if (item.transform.parent == _inventoryGrid) { item.transform.SetParent(_equipedGrid); } item.transform.SetAsLastSibling(); }