private void OnApplicationQuit() { BagItemObject bag = Global.Component.GetPlayerBag(); if (bag != null) { bag.Clear(); } EquipmentItemObject equipment = (EquipmentItemObject)Global.Obj.GetEquipmentSlot().GetComponent <ItemCell>().item; if (equipment != null) { equipment.Clear(); } }
ContainerPack GetContainerPack() { // TODO сначало рука GameObject _equipmentSlot = Global.Obj.GetEquipmentSlot(); EquipmentItemObject _equipment = (EquipmentItemObject)_equipmentSlot.GetComponent <ItemCell>().item; if (_equipment != null && _equipment.IsFull() == false) { return(new ContainerPack(_equipment, Global.Component.GetBarEventHandler(), Global.Obj.GetBar().transform.GetChild(0).gameObject)); } else { GameObject _bagSlot = Global.Obj.GetBagSlot(); BagItemObject _bag = (BagItemObject)_bagSlot.GetComponent <ItemCell>().item; if (_bag != null && _bag.IsFull() == false) { return(new ContainerPack(_bag, Global.Component.GetBagEventHandler(), Global.Obj.GetInventory().transform.GetChild(0).gameObject)); } } return(null); }
void OnOpenBag_LocateItems(BagItemObject bag) { LocateItems(); bag = null; }
void OnOpenBag_CreateSlots(BagItemObject bag) { CreateSlots(); bag = null; }
void OnOpenBag_ResizeWindow(BagItemObject bag) { ResizeWindow(); bag = null; }
void OnOpenBag_EnableContainer(BagItemObject bag) { container.SetActive(true); bag = null; }
void OnOpenBag_InitBag(BagItemObject bag) { this.bag = bag; }
void OnCloseBag_DeinitBag() { this.bag = null; }