public virtual void LateUpdate() { if (populateHitsList) { if (isAppFocused) { int cell = Grid.PosToCell(Camera.main.ScreenToWorldPoint(KInputManager.GetMousePos())); if (Grid.IsValidCell(cell)) { hits.Clear(); GetSelectablesUnderCursor(hits); KSelectable objectUnderCursor = GetObjectUnderCursor(false, (KSelectable s) => s.GetComponent <KSelectable>().IsSelectable, null); UpdateHoverElements(hits); if (!hasFocus && (UnityEngine.Object)hoverOverride == (UnityEngine.Object)null) { ClearHover(); } else if ((UnityEngine.Object)objectUnderCursor != (UnityEngine.Object)hover) { ClearHover(); hover = objectUnderCursor; if ((UnityEngine.Object)objectUnderCursor != (UnityEngine.Object)null) { Game.Instance.Trigger(2095258329, objectUnderCursor.gameObject); objectUnderCursor.Hover(!playedSoundThisFrame); playedSoundThisFrame = true; } } playedSoundThisFrame = false; } } } else { UpdateHoverElements(null); } }