Пример #1
0
        /// <summary>
        /// This method can be called to redo the action.
        /// </summary>
        public void Redo()
        {
            EditorGizmoSystem gizmoSystem = EditorGizmoSystem.Instance;

            gizmoSystem.TransformPivotPoint = _newPivotPoint;
            TransformPivotPointChangedMessage.SendToInterestedListeners(_oldPivotPoint, _newPivotPoint);
        }
Пример #2
0
 /// <summary>
 /// Executes the action.
 /// </summary>
 public void Execute()
 {
     // If the pivot points differ, execute the action
     if (_oldPivotPoint != _newPivotPoint)
     {
         EditorGizmoSystem gizmoSystem = EditorGizmoSystem.Instance;
         gizmoSystem.TransformPivotPoint = _newPivotPoint;
         TransformPivotPointChangedMessage.SendToInterestedListeners(_oldPivotPoint, _newPivotPoint);
         EditorUndoRedoSystem.Instance.RegisterAction(this);
     }
 }
Пример #3
0
        /// <summary>
        /// Convenience function for sending a transform pivot point changed message to
        /// all interested listeners.
        /// </summary>
        /// <param name="oldPivotPoint">
        /// This is the old pivot point before it was changed.
        /// </param>
        /// <param name="newPivotPoint">
        /// This is the new pivot point.
        /// </param>
        public static void SendToInterestedListeners(TransformPivotPoint oldPivotPoint, TransformPivotPoint newPivotPoint)
        {
            var message = new TransformPivotPointChangedMessage(oldPivotPoint, newPivotPoint);

            MessageListenerDatabase.Instance.SendMessageToInterestedListeners(message);
        }