/// <summary> /// Invoked to be forced to stop tracking /// </summary> /// <param name="e"></param> private void OnStayTracking(MouseDraggingTrackerEventArgs e) { if (m_stayTracking != null) { m_stayTracking(this, e); } }
public void OnStopTracking(MouseDraggingTrackerEventArgs e) { if (m_trackingCoroutine != null) { StopCoroutine(m_trackingCoroutine); } if (m_stopTracking != null) { m_stopTracking(this, e); } // KaiTool_CommandManager.Instance.ExecuteCommand(new KaiTool_MoveCommand(transform, m_lastRecordPosition, m_lastRecordRotation, transform.position, transform.rotation)); m_stopTracking_UnityEvent.Invoke(); }
/// <summary> /// Invoked to be forced to start tracking. /// </summary> /// <param name="e"></param> public void OnStartTracking(MouseDraggingTrackerEventArgs e) { if (m_trackingCoroutine != null) { StopCoroutine(m_trackingCoroutine); } m_trackingCoroutine = StartCoroutine(TrackingEnumerator()); if (m_startTracking != null) { m_startTracking(this, e); } RecordPositionAndRotation(); m_startTracking_UnityEvent.Invoke(); }