コード例 #1
0
 private void ClearCurrentInternal()
 {
     if (_current != null)
     {
         UICenterTarget.Clear();
         _current.OnControlHovered(false);
     }
     _current           = null;
     _currentGameObject = null;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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));
 }