Пример #1
0
        public void updateData()
        {
            if ((mData == null) || (mNode == null))
            {
                return;
            }

            // Move control data to data (CONTROL DATA -> DATA)
            //
            visualModelAnimAssetTag afterChanges = new visualModelAnimAssetTag();

            afterChanges.copy(mData);
            afterChanges.position      = (decimal)positionSliderEdit.Value;
            afterChanges.force         = (decimal)forceSliderEdit.Value;
            afterChanges.tobone        = (string)toBoneComboBox.SelectedItem;
            afterChanges.lifespan      = (decimal)durationSliderEdit.Value;
            afterChanges.checkSelected = (bool)selectedCheckBox.Checked;

            // Add/Execute undo action
            UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges);

            mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction);


            // Update animation slider
            mVisualEditorPage.setAnimationControlState(AnimationControl.AnimControlStateEnum.ePaused);
            mVisualEditorPage.setAnimationControlNormalizedTime((float)afterChanges.position);
        }
Пример #2
0
        public void updateData()
        {
            if ((mData == null) || (mNode == null))
            {
                return;
            }

            // Move control data to data (CONTROL DATA -> DATA)
            //
            visualModelAnimAssetTag afterChanges = new visualModelAnimAssetTag();

            afterChanges.copy(mData);
            afterChanges.position     = (decimal)floatSliderEdit1.Value;
            afterChanges.name         = soundBrowseControl1.FileName;
            afterChanges.tobone       = (string)toBoneComboBox.SelectedItem;
            afterChanges.checkvisible = visibleCheckBox.Checked;
            afterChanges.checkFOW     = checkBoxFOW.Checked;

            // Add/Execute undo action
            UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges);

            mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction);


            // Update and Pause animation slider
            mVisualEditorPage.setAnimationControlState(AnimationControl.AnimControlStateEnum.ePaused);
            mVisualEditorPage.setAnimationControlNormalizedTime((float)afterChanges.position);
        }
Пример #3
0
        public void updateData()
        {
            if ((mData == null) || (mNode == null))
            {
                return;
            }

            // Move control data to data (CONTROL DATA -> DATA)
            //
            visualModelAnimAssetTag afterChanges = new visualModelAnimAssetTag();

            afterChanges.copy(mData);
            afterChanges.position = (decimal)floatSliderEdit1.Value;

            float sizeX = sizeXFloatSliderEdit.Value;
            float sizeZ = sizeZFloatSliderEdit.Value;

            string userData;

            ConvertUserDataValuesToString(out userData, sizeX, sizeZ);
            afterChanges.userData = userData;

            // Add/Execute undo action
            UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges);

            mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction);


            // Update animation slider
            mVisualEditorPage.setAnimationControlState(AnimationControl.AnimControlStateEnum.ePaused);
            mVisualEditorPage.setAnimationControlNormalizedTime((float)afterChanges.position);
        }
Пример #4
0
        public void updateData()
        {
            if ((mData == null) || (mNode == null))
            {
                return;
            }

            // Move control data to data (CONTROL DATA -> DATA)
            //
            visualModelAnimAssetTag afterChanges = new visualModelAnimAssetTag();

            afterChanges.copy(mData);
            afterChanges.position = (decimal)floatSliderEdit1.Value;
            afterChanges.tobone   = (string)toBoneComboBox.SelectedItem;

            float sizeX       = sizeXFloatSliderEdit.Value;
            float sizeZ       = sizeZFloatSliderEdit.Value;
            bool  targetValue = (targetValueComboBox.SelectedIndex > 0) ? false : true;
            bool  shape       = (fillShapeComboBox.SelectedIndex > 0) ? true : false;

            string userData;

            ConvertUserDataValuesToString(out userData, sizeX, sizeZ, targetValue, shape);
            afterChanges.userData = userData;

            // Add/Execute undo action
            UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges);

            mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction);


            // Update animation slider
            mVisualEditorPage.setAnimationControlState(AnimationControl.AnimControlStateEnum.ePaused);
            mVisualEditorPage.setAnimationControlNormalizedTime((float)afterChanges.position);
        }