Exemple #1
0
        protected override void DrawCounterMotionSettings()
        {
            base.DrawCounterMotionSettings();
            EditorGUILayout.Space();
            VrtpEditorUtils.PropertyField(_pCounterVelMode);
            var mode = (TunnellingImageBase.CounterVelocityMode)_pCounterVelMode.p.intValue;

            if (mode == TunnellingImageBase.CounterVelocityMode.REAL)
            {
                VrtpEditorUtils.PropertyField(_pCounterVelResetDistance);
                VrtpEditorUtils.PropertyField(_pCounterVelResetTime);
            }
            if (mode != TunnellingImageBase.CounterVelocityMode.OFF)
            {
                VrtpEditorUtils.PropertyField(_pCounterVelStr);
                VrtpEditorUtils.PropertyField(_pCounterVelAxs);
            }
        }
 protected virtual void DrawCounterMotionSettings()
 {
     VrtpEditorUtils.PropertyField(_pCounterRotStr);
     VrtpEditorUtils.PropertyField(_pCounterRotAxs);
 }
        protected void DrawMotionSettings()
        {
            #region Detection
            VrtpStyles.BeginSectionBox(); {
                ++EditorGUI.indentLevel;
                _showMotionDetection.active = EditorGUILayout.Foldout(_showMotionDetection, "Motion Detection", VrtpStyles.sectionFoldout);
                --EditorGUI.indentLevel;
                if (_showMotionDetection)
                {
                    EditorGUILayout.Space();

                    #region Angular Velocity
                    VrtpStyles.BeginChildBox(); {
                        VrtpEditorUtils.ToggleProperty(_pAvUse, _pAvUse.content, VrtpStyles.sectionHeader);
                        if (_tb.useAngularVelocity)
                        {
                            ++EditorGUI.indentLevel;
                            EditorGUILayout.PropertyField(_pAvStr, _gcAvStr);
                            EditorGUILayout.PropertyField(_pAvMin, _gcAvMin);
                            EditorGUILayout.PropertyField(_pAvMax, _gcAvMax);
                            EditorGUILayout.PropertyField(_pAvSmooth, _gcAvSmooth);
                            --EditorGUI.indentLevel;
                        }
                    } VrtpStyles.EndChildBox();
                    #endregion

                    #region Linear Acceleration
                    VrtpStyles.BeginChildBox(); {
                        VrtpEditorUtils.ToggleProperty(_pLaUse, _pLaUse.content, VrtpStyles.sectionHeader);
                        if (_tb.useAcceleration)
                        {
                            ++EditorGUI.indentLevel;
                            EditorGUILayout.PropertyField(_pLaStr, _gcLaStr);
                            EditorGUILayout.PropertyField(_pLaMin, _gcLaMin);
                            EditorGUILayout.PropertyField(_pLaMax, _gcLaMax);
                            EditorGUILayout.PropertyField(_pLaSmooth, _gcLaSmooth);
                            --EditorGUI.indentLevel;
                        }
                    } VrtpStyles.EndChildBox();
                    #endregion

                    #region Linear Velocity
                    VrtpStyles.BeginChildBox(); {
                        VrtpEditorUtils.ToggleProperty(_pLvUse, _pLvUse.content, VrtpStyles.sectionHeader);
                        if (_tb.useVelocity)
                        {
                            ++EditorGUI.indentLevel;
                            EditorGUILayout.PropertyField(_pLvStr, _gcLvStr);
                            EditorGUILayout.PropertyField(_pLvMin, _gcLvMin);
                            EditorGUILayout.PropertyField(_pLvMax, _gcLvMax);
                            EditorGUILayout.PropertyField(_pLvSmooth, _gcLvSmooth);
                            --EditorGUI.indentLevel;
                        }
                    } VrtpStyles.EndChildBox();
                    #endregion

                    #region Force Vignette
                    EditorGUILayout.Space();
                    VrtpEditorUtils.PropertyField(_pForceVigMode);
                    if (_pForceVigMode.p.intValue != (int)TunnellingBase.ForceVignetteMode.NONE)
                    {
                        VrtpEditorUtils.PropertyField(_pForceVigVal);
                    }
                    #endregion
                }
            } VrtpStyles.EndSectionBox();
            #endregion

            #region Effects
            VrtpStyles.BeginSectionBox(); {
                ++EditorGUI.indentLevel;
                _showMotionEffects.active = EditorGUILayout.Foldout(_showMotionEffects, "Motion Effects", VrtpStyles.sectionFoldout);
                --EditorGUI.indentLevel;
                if (_showMotionEffects)
                {
                    EditorGUILayout.Space();

                    #region Counter-motion
                    VrtpStyles.BeginChildBox(); {
                        VrtpEditorUtils.ToggleProperty(_pCounterMotion, null, VrtpStyles.sectionHeader);
                        if (_pCounterMotion.p.boolValue)
                        {
                            ++EditorGUI.indentLevel;
                            DrawCounterMotionSettings();
                            --EditorGUI.indentLevel;
                        }
                    } VrtpStyles.EndChildBox();
                    #endregion

                    EditorGUILayout.Separator();
                    EditorGUILayout.PropertyField(_pMotionEffectTarget);
                    if (_tb.motionEffectTarget == null && _tb.usingMotionEffectTarget)
                    {
                        EditorGUILayout.HelpBox("No motion effect target specified!", MessageType.Error);
                    }

                    #region Auto-tilt
                    VrtpStyles.BeginChildBox(); {
                        VrtpEditorUtils.ToggleProperty(_pArtTilt, null, VrtpStyles.sectionHeader);
                        if (_pArtTilt.p.boolValue)
                        {
                            ++EditorGUI.indentLevel;
                            EditorGUILayout.PropertyField(_pArtTiltStr);
                            EditorGUILayout.PropertyField(_pArtTiltMax);
                            EditorGUILayout.PropertyField(_pArtTiltSmooth);
                            --EditorGUI.indentLevel;
                        }
                    } VrtpStyles.EndChildBox();
                    #endregion

                    VrtpStyles.BeginChildBox(); {
                        EditorGUILayout.PropertyField(_pDivFps);
                        if (_pDivFps.p.intValue > 1)
                        {
                            EditorGUILayout.PropertyField(_pDivTrans);
                            EditorGUILayout.PropertyField(_pDivRot);
                        }
                    } VrtpStyles.EndChildBox();
                }
            } VrtpStyles.EndSectionBox();
            #endregion
        }