public void Unselect() { if (_lastSelectedObject == null) { return; } _lastSelectedObject.Unselect(); _lastSelectedObject.Hover(false); _lastSelectedObject = null; _isPathObjectUpdateAllowed = true; }
public bool OtherObjectHovered(out ScalableObject hoveredObject, out bool overObject) { if (!_isPathObjectUpdateAllowed && _lastSelectedObject != null) { overObject = false; CheckConditions(out overObject); _lastSelectedObject.Hover(overObject, true); hoveredObject = _lastSelectedObject; return(false); } bool otherObjectHovered; if (CheckCondition(out hoveredObject, out otherObjectHovered)) { overObject = true; if (otherObjectHovered) { if (_lastHoveredObject != null && _lastHoveredObject.Hovered) { _lastHoveredObject.Hover(false); } _lastHoveredObject = hoveredObject; hoveredObject = _lastHoveredObject; return(true); } if (!_lastHoveredObject.Hovered) { _lastHoveredObject.Hover(true, true); } hoveredObject = _lastHoveredObject; return(otherObjectHovered); } hoveredObject = null; overObject = false; if (_lastHoveredObject != null && _lastHoveredObject.Hovered) { _lastHoveredObject.Hover(false); } return(false); }
public void HoverPathObject(bool isHover) { if (_lastHoveredObject != null && _lastHoveredObject.Hovered) { _lastHoveredObject.Hover(false); } ; if (isHover) { if (_currentHoveredObject) { _currentHoveredObject.Hover(true, true); } _lastHoveredObject = _currentHoveredObject; } }