protected override void OnDisable() { base.OnDisable(); this.Hide(); this.DestroyNotepadObject(); if (MenuNotepad.Get() != null) { MenuNotepad.Get().gameObject.SetActive(false); } this.m_Player.UnblockRotation(); this.m_Player.UnblockMoves(); HUDQuickAccessBar.Get().OnHideNotepad(); Player.Get().OnHideNotepad(); this.m_Animator.SetInteger(this.m_NotepadHash, 0); HUDNotepad.Get().Deactivate(); CursorManager.Get().ShowCursor(false); }
private void UpdateFocusedItem() { this.m_FocusedItem = null; if (HUDBackpack.Get().m_IsHovered) { return; } if (this.m_CarriedItem) { this.m_FocusedItem = this.m_CarriedItem; return; } if (HUDQuickAccessBar.Get().AnyButtonSelected()) { return; } for (int i = 0; i < this.m_BackpackHits.Length; i++) { Item component = this.m_BackpackHits[i].collider.gameObject.GetComponent <Item>(); if (this.CanFocusItem(component)) { this.m_FocusedItem = component; return; } } if (!this.m_MouseOverBackpack && !this.m_MouseOverCraftTable) { for (int j = 0; j < this.m_WorldHits.Length; j++) { Item component2 = this.m_WorldHits[j].collider.gameObject.GetComponent <Item>(); if (this.CanFocusItem(component2)) { this.m_FocusedItem = component2; return; } } } }