private void ClearCurrentInternal() { if (_current != null) { UICenterTarget.Clear(); _current.OnControlHovered(false); } _current = null; _currentGameObject = null; }
public void CancelDrag() { _dragging = false; UICenterTarget.Clear(); if (_springJoint == null || _springJoint.connectedBody == null) { return; } _springJoint.connectedBody.drag = _oldDrag; _springJoint.connectedBody.angularDrag = _oldAngularDrag; _springJoint.connectedBody = null; }
private void SetNewCurrent(IWorldControl newCurrent, GameObject newGo) { _foundControl = true; _clearTimer.Triggered = false; if (_current == newCurrent) { return; } if (_current != null) { UICenterTarget.Clear(); _current.OnControlHovered(false); } _currentGameObject = newGo; _current = newCurrent; UICenterTarget.SetText(_current.OnControlHovered(true)); }