Exemplo n.º 1
0
 // COPY PROPERTY //
 //
 virtual public void CopyProperty(BaseProperty originalProperty, AmpsBlueprint theOwnerBlueprint)
 {
     // We don't copy non-user-editable properties so their values
     // don't linger, code updates are followed in already placed properties
     // after the next blueprint commit.
     //
     //name = originalProperty.name;
     //allowDataModeRandomConstant = originalProperty.allowDataModeRandomConstant;
     //allowDataModeCurve = originalProperty.allowDataModeCurve;
     //allowDataModeRandomCurve = originalProperty.allowDataModeRandomCurve;
     //allowDataModeReference = originalProperty.allowDataModeReference;
     //allowDataModeParameter = originalProperty.allowDataModeParameter;
     dataMode      = originalProperty.dataMode;
     reference     = originalProperty.reference;
     parameterName = originalProperty.parameterName;
     parameter     = originalProperty.parameter;
     if (theOwnerBlueprint != null)
     {
         ownerBlueprint = theOwnerBlueprint;
     }
     else
     {
         ownerBlueprint = originalProperty.ownerBlueprint;
     }
     coordSystem = originalProperty.coordSystem;
     coordSystemConversionMode = originalProperty.coordSystemConversionMode;
 }
Exemplo n.º 2
0
//============================================================================//
#if UNITY_EDITOR
        // INITIALIZE //
        //
        virtual public void Initialize(string theName, AmpsBlueprint theOwnerBlueprint)
        {
            name = theName;
            allowDataModeRandomConstant = true;
            allowDataModeCurve          = true;
            allowDataModeRandomCurve    = true;
            allowDataModeReference      = true;
            dataMode                  = eDataMode.Constant;
            reference                 = null;
            ownerBlueprint            = theOwnerBlueprint;
            coordSystem               = AmpsHelpers.eCoordSystems.World;
            coordSystemConversionMode = eCoordSystemConversionMode.NoConversion;
        }
Exemplo n.º 3
0
 // SET CONVERSION MODE //
 //
 public void SetConversionMode(AmpsHelpers.eStackFunction stackFunction)
 {
     if (stackFunction == AmpsHelpers.eStackFunction.Position)
     {
         coordSystemConversionMode = BaseProperty.eCoordSystemConversionMode.AsPosition;
     }
     else if (stackFunction == AmpsHelpers.eStackFunction.Rotation ||
              stackFunction == AmpsHelpers.eStackFunction.RotationRate)
     {
         coordSystemConversionMode = BaseProperty.eCoordSystemConversionMode.AsRotation;
     }
     else if (stackFunction == AmpsHelpers.eStackFunction.Velocity ||
              stackFunction == AmpsHelpers.eStackFunction.Acceleration)
     {
         coordSystemConversionMode = BaseProperty.eCoordSystemConversionMode.AsVelocity;
     }
     else if (stackFunction == AmpsHelpers.eStackFunction.Scale)
     {
         coordSystemConversionMode = BaseProperty.eCoordSystemConversionMode.AsScale;
     }
 }