void Awake() { AccountID = GameObject.Find("AccountID_DontDestroy").GetComponent <AccountID>().theID; jsonEquippableItems = new List <JsonEquippableItem>(); characterStat = new CharacterInformation_item(); EP = GameObject.Find("Equipment Panel"); equipmentPanel = EP.GetComponent <EquipmentPanel>(); IV = GameObject.Find("Inventory"); inventory = IV.GetComponent <Inventory>(); UIManager = GameObject.Find("UIManager"); character = UIManager.GetComponent <Character>(); jsonLoadItem = UIManager.GetComponent <JsonLoadItem>(); characterStats = jsonLoadItem.characterStats; // print(characterStats[0].ID_Character_Global); allEquippedItems = UIManager.GetComponent <JsonLoadItem>().allEquippedItems; GameObject CP = GameObject.Find("charID_DontDestroy"); // toCode = CP.GetComponent<fromCharToCode>(); }
public void loadInventoryUI() { jsonLoadItem = UIManager.GetComponent <JsonLoadItem>(); itemSlots.Clear(); items = new List <EquippableItem>(jsonLoadItem.unequippedItems); inventoryType.refreshItem(); itemSlotsPanel.Clear(); removeItemSlotsPanel(); setItemSlots(); refreshUI(items); }
private void Awake() { //equipmentSlots = equipmentSlotsParent.GetComponentsInChildren<EquipmentSlot>(); equipmentSlots = new EquipmentSlot[8]; setEquipmentSlot(); GameObject UIManager = GameObject.Find("UIManager"); jsonLoadItem = UIManager.GetComponent <JsonLoadItem>(); charID = jsonLoadItem.charID; statModifier = transform.parent.gameObject.transform.GetChild(2).GetChild(0).GetComponent <StatModifier>(); refreshUI(); }
void Awake() { GameObject UIManager = GameObject.Find("UIManager"); jsonSaveItem = UIManager.GetComponent <JsonSaveItem>(); jsonLoadItem = UIManager.GetComponent <JsonLoadItem>(); character = UIManager.GetComponent <Character>(); GameObject Inventory = GameObject.Find("Inventory"); inventory = Inventory.GetComponent <Inventory>(); GameObject EP = GameObject.Find("Equipment Panel"); equipmentPanel = EP.GetComponent <EquipmentPanel>(); }
private void Awake() { UIManager = GameObject.Find("UIManager"); jsonLoadItem = UIManager.GetComponent <JsonLoadItem>(); GameObject InvenType = GameObject.Find("TypeButtons"); inventoryType = InvenType.GetComponent <InventoryType>(); scrollPanel = GameObject.Find("Scroll Panel"); items = new List <EquippableItem>(jsonLoadItem.unequippedItems); Debug.Log("items num:" + items.Count); setItemSlots(); refreshUI(items); Debug.Log("inventory awake"); }