public override void open() { base.open(); Cursor.visible = true; Cursor.lockState = CursorLockMode.Confined; InventorySelect invSel = ui_instance.GetComponentInChildren <InventorySelect>(); invSel.InitInventory(); }
void Start() { rb = GetComponent <Rigidbody2D>(); playerStats = GetComponent <PlayerAttributes>(); inventorySelect = GetComponentInChildren <InventorySelect>(); inventoryUI = this.transform.GetChild(0).GetChild(0).gameObject; canvas = inventoryUI.GetComponent <Canvas>(); inventory = this.transform.GetChild(0).GetComponent <Inventory>(); activeSlot = weaponSlot1; weapon = activeSlot.transform.GetChild(0).GetComponent <BaseWeapon>(); }