Exemplo n.º 1
0
//============================================================================//
        #region GUI

        // SHOW PROPERTIES //
        //
        override public void ShowProperties(ref bool shouldRepaint)
        {
            base.ShowProperties(ref shouldRepaint);

            eventName.ShowProperty(ref selectedProperty, false);
            untriggeredValue.ShowProperty(ref selectedProperty, false);

            if (triggerDataMode.displayData == null)
            {
                triggerDataMode.displayData = () => triggerDataModesDisplayData;                                                  // We have to do this here because delegates are not serialized.
            }
            triggerDataMode.ShowProperty(ref selectedProperty, false);

            if ((eTriggerDataModes)triggerDataMode.GetValue() == eTriggerDataModes.CustomValue)
            {
                triggeredCustomValue.ShowProperty(ref selectedProperty, false);
            }

            infiniteTriggerCount.ShowProperty(ref selectedProperty, false);
            if (infiniteTriggerCount.GetValue() == false)
            {
                maxTriggerCount.ShowProperty(ref selectedProperty, false);
            }

            triggerToggle.ShowProperty(ref selectedProperty, false);
            if (triggerToggle.GetValue() == false)
            {
                triggerDuration.ShowProperty(ref selectedProperty, false);
            }
        }
Exemplo n.º 2
0
//============================================================================//
        #region GUI

        // SHOW PROPERTIES //
        //
        override public void ShowProperties(ref bool shouldRepaint)
        {
            base.ShowProperties(ref shouldRepaint);

            BaseProperty previousSelection = selectedProperty;

            vector.ShowProperty(ref selectedProperty, false);

            if (selectedProperty != previousSelection)
            {
                shouldRepaint = true;
            }
        }
Exemplo n.º 3
0
        //// COPY PROPERTIES //
        ////
        //override public void CopyProperties(BaseModule originalModule, AmpsBlueprint theOwnerBlueprint)
        //{
        //    base.CopyProperties(originalModule, theOwnerBlueprint);

        //    QuickSetupMFModule om = originalModule as QuickSetupMFModule;
        //    if (om != null)
        //    {
        //        spawnRate.CopyProperty(om.spawnRate, theOwnerBlueprint);
        //        deathCondition.CopyProperty(om.deathCondition, theOwnerBlueprint);
        //        acceleration.CopyProperty(om.acceleration, theOwnerBlueprint);
        //        velocity.CopyProperty(om.velocity, theOwnerBlueprint);
        //        position.CopyProperty(om.position, theOwnerBlueprint);
        //        rotationRate.CopyProperty(om.rotationRate, theOwnerBlueprint);
        //        rotation.CopyProperty(om.rotation, theOwnerBlueprint);
        //        scale.CopyProperty(om.scale, theOwnerBlueprint);
        //        color.CopyProperty(om.color, theOwnerBlueprint);
        //        pivotOffset.CopyProperty(om.pivotOffset, theOwnerBlueprint);
        //    }
        //}

//============================================================================//
        #region GUI

        // SHOW PROPERTIES //
        //
        override public void ShowProperties(ref bool shouldRepaint)
        {
            base.ShowProperties(ref shouldRepaint);

            BaseProperty previousSelection = selectedProperty;

            PropertyGroup("Spawn rate");
            modifySpawnRate.ShowProperty(ref selectedProperty, false);
            spawnRate.ShowProperty(ref selectedProperty, false);

            PropertyGroup("Life");
            modifyDeathCondition.ShowProperty(ref selectedProperty, false);
            deathCondition.ShowProperty(ref selectedProperty, false);

            PropertyGroup("Position");
            modifyPosition.ShowProperty(ref selectedProperty, false);
            position.ShowProperty(ref selectedProperty, false);

            PropertyGroup("Acceleration");
            modifyAcceleration.ShowProperty(ref selectedProperty, false);
            acceleration.ShowProperty(ref selectedProperty, false);

            PropertyGroup("Velocity");
            modifyVelocity.ShowProperty(ref selectedProperty, false);
            velocity.ShowProperty(ref selectedProperty, false);

            PropertyGroup("Rotation");
            modifyRotation.ShowProperty(ref selectedProperty, false);
            rotation.ShowProperty(ref selectedProperty, false);

            PropertyGroup("Rotation rate");
            modifyRotationRate.ShowProperty(ref selectedProperty, false);
            rotationRate.ShowProperty(ref selectedProperty, false);

            PropertyGroup("Scale");
            modifyScale.ShowProperty(ref selectedProperty, false);
            scale.ShowProperty(ref selectedProperty, false);

            PropertyGroup("Color");
            modifyColor.ShowProperty(ref selectedProperty, false);
            color.ShowProperty(ref selectedProperty, false);

            PropertyGroup("Pivot offset");
            modifyPivotOffset.ShowProperty(ref selectedProperty, false);
            pivotOffset.ShowProperty(ref selectedProperty, false);

            if (selectedProperty != previousSelection)
            {
                shouldRepaint = true;
            }
        }
Exemplo n.º 4
0
//============================================================================//
        #region GUI

        // SHOW PROPERTIES //
        //
        override public void ShowProperties(ref bool shouldRepaint)
        {
            base.ShowProperties(ref shouldRepaint);

            BaseProperty previousSelection = selectedProperty;

            PropertyGroup("Shape: Point");
            point.ShowProperty(ref selectedProperty, false);

            if (selectedProperty != previousSelection)
            {
                shouldRepaint = true;
            }
        }
Exemplo n.º 5
0
//============================================================================//
        #region GUI

        // SHOW PROPERTIES //
        //
        override public void ShowProperties(ref bool shouldRepaint)
        {
            base.ShowProperties(ref shouldRepaint);

            BaseProperty previousSelection = selectedProperty;

            PropertyGroup("Object transform");
            sampledObject.ShowProperty(ref selectedProperty, false);
            insideValue.ShowProperty(ref selectedProperty, false);
            outsideValue.ShowProperty(ref selectedProperty, false);

            if (selectedProperty != previousSelection)
            {
                shouldRepaint = true;
            }
        }
Exemplo n.º 6
0
        //// COPY PROPERTIES //
        ////
        //override public void CopyProperties(BaseModule originalModule, AmpsBlueprint theOwnerBlueprint)
        //{
        //    base.CopyProperties(originalModule, ownerBlueprint);

        //    MotionTweakerMFModule om = originalModule as MotionTweakerMFModule;
        //    if (om != null)
        //    {
        //        modifyMomentum.CopyProperty(om.modifyMomentum, theOwnerBlueprint);
        //        modifyDisplacement.CopyProperty(om.modifyDisplacement, theOwnerBlueprint);
        //        accelerationMultiplier.CopyProperty(om.accelerationMultiplier, theOwnerBlueprint);
        //        momentumMultiplier.CopyProperty(om.momentumMultiplier, theOwnerBlueprint);
        //        velocityMultiplier.CopyProperty(om.velocityMultiplier, theOwnerBlueprint);
        //        displacementMultiplier.CopyProperty(om.displacementMultiplier, theOwnerBlueprint);
        //    }
        //}

//============================================================================//
        #region GUI

        // SHOW PROPERTIES //
        //
        override public void ShowProperties(ref bool shouldRepaint)
        {
            base.ShowProperties(ref shouldRepaint);

            BaseProperty previousSelection = selectedProperty;

            PropertyGroup("Acceleration");
            modifyAcceleration.ShowProperty(ref selectedProperty, false);
            accelerationMultiplier.ShowProperty(ref selectedProperty, false);
            modifyMomentum.ShowProperty(ref selectedProperty, false);
            momentumMultiplier.ShowProperty(ref selectedProperty, false);

            PropertyGroup("Velocity");
            modifyVelocity.ShowProperty(ref selectedProperty, false);
            velocityMultiplier.ShowProperty(ref selectedProperty, false);
            modifyDisplacement.ShowProperty(ref selectedProperty, false);
            displacementMultiplier.ShowProperty(ref selectedProperty, false);

            if (selectedProperty != previousSelection)
            {
                shouldRepaint = true;
            }
        }
Exemplo n.º 7
0
//============================================================================//
        #region GUI

        // SHOW PROPERTIES //
        //
        override public void ShowProperties(ref bool shouldRepaint)
        {
            base.ShowProperties(ref shouldRepaint);
            BaseProperty previousSelection = selectedProperty;

            PropertyGroup("");

            if (orientation.displayData == null)
            {
                orientation.displayData = () => orientationDisplayData;                                              // We have to do this here because delegates are not serialized.
            }
            orientation.ShowProperty(ref selectedProperty, false);

            if (alignmentVector == null)                // HACK
            {
                alignmentVector = ScriptableObject.CreateInstance <VectorProperty>();
                alignmentVector.Initialize("Alignment vector", new Vector4(0, 1, 0, 0), ownerBlueprint);
                alignmentVector.hideW = true;
                AddProperty(alignmentVector, false);
            }
            if (orientation.GetValue() == (int)eOrientation.VectorAlignedCameraFacing)
            {
                alignmentVector.ShowProperty(ref selectedProperty, false);
            }

            if (normalMode.displayData == null)
            {
                normalMode.displayData = () => normalModeDisplayData;                                             // We have to do this here because delegates are not serialized.
            }
            normalMode.ShowProperty(ref selectedProperty, false);
            if (tangentMode.displayData == null)
            {
                tangentMode.displayData = () => tangentModeDisplayData;                                              // We have to do this here because delegates are not serialized.
            }
            tangentMode.ShowProperty(ref selectedProperty, false);
            if (uv2Mode.displayData == null)
            {
                uv2Mode.displayData = () => uv2ModeDisplayData;                                          // We have to do this here because delegates are not serialized.
            }
            uv2Mode.ShowProperty(ref selectedProperty, false);

            bool previousIsDoubleSided = isDoubleSided.GetValue();

            isDoubleSided.ShowProperty(ref selectedProperty, false);
            bool currentIsDoubleSided = isDoubleSided.GetValue();

            if (currentIsDoubleSided != previousIsDoubleSided)
            {
                ownerBlueprint.ownerEmitter.SoftReset();
            }

            if (currentIsDoubleSided)
            {
                if (doubleSidedColorMode.displayData == null)
                {
                    doubleSidedColorMode.displayData = () => doubleSidedColorModeDisplayData;                                                           // We have to do this here because delegates are not serialized.
                }
                doubleSidedColorMode.ShowProperty(ref selectedProperty, false);
            }
            if (selectedProperty != previousSelection)
            {
                shouldRepaint = true;
            }
        }