Ejemplo n.º 1
0
 void SerializeVer1()
 {
     _Target     = (FlexibleGameObject)_OldTarget;
     _FloatValue = (FlexibleFloat)_OldFloatValue;
     _IntValue   = (FlexibleInt)_OldIntValue;
     _BoolValue  = (FlexibleBool)_OldBoolValue;
 }
Ejemplo n.º 2
0
 void SerializeVer1()
 {
     _Duration              = (FlexibleFloat)_OldDuration;
     _Curve                 = (FlexibleAnimationCurve)_OldCurve;
     _UseRealtime           = (FlexibleBool)_OldUseRealtime;
     _RepeatUntilTransition = (FlexibleInt)_OldRepeatUntilTransition;
 }
Ejemplo n.º 3
0
 void SerializeVer1()
 {
     _IntValue   = (FlexibleInt)_OldIntValue;
     _FloatValue = (FlexibleFloat)_OldFloatValue;
     _BoolValue  = (FlexibleBool)_OldBoolValue;
 }
        public void UpdateInput(NodeGraph nodeGraph, GraphArgumentUpdateTiming updateTiming)
        {
            ParameterContainerInternal parameterContainer = nodeGraph.parameterContainer;

            if (parameterContainer == null)
            {
                return;
            }

            for (int i = 0, count = _Arguments.Count; i < count; ++i)
            {
                GraphArgument argument = _Arguments[i];

                if ((argument.updateTiming & updateTiming) == 0 ||
                    !argument.isPublicSet)
                {
                    continue;
                }

                Parameter parameter = argument.parameterID != 0? parameterContainer.GetParam(argument.parameterID) : parameterContainer.GetParam(argument.parameterName);

                string invalidText = GetInvalidText(argument, parameter);
                if (!string.IsNullOrEmpty(invalidText))
                {
                    Debug.LogWarning(invalidText, nodeGraph);
                    continue;
                }

                if (!parameter.isPublicSet)
                {
                    Debug.LogWarning("Set of parameter is not public. : \"" + parameter.name + "\"", nodeGraph);
                    continue;
                }

                switch (parameter.type)
                {
                case Parameter.Type.Int:
                {
                    FlexibleInt intParameter = _IntParameters[argument.parameterIndex];
                    parameter.intValue = intParameter.value;
                }
                break;

                case Parameter.Type.Long:
                {
                    FlexibleLong longParameter = _LongParameters[argument.parameterIndex];
                    parameter.longValue = longParameter.value;
                }
                break;

                case Parameter.Type.Float:
                {
                    FlexibleFloat floatParameter = _FloatParameters[argument.parameterIndex];
                    parameter.floatValue = floatParameter.value;
                }
                break;

                case Parameter.Type.Bool:
                {
                    FlexibleBool boolParameter = _BoolParameters[argument.parameterIndex];
                    parameter.boolValue = boolParameter.value;
                }
                break;

                case Parameter.Type.String:
                {
                    FlexibleString stringParameter = _StringParameters[argument.parameterIndex];
                    parameter.stringValue = stringParameter.value;
                }
                break;

                case Parameter.Type.Enum:
                {
                    FlexibleEnumAny enumParameter = _EnumParameters[argument.parameterIndex];
                    parameter.intValue = enumParameter.value;
                }
                break;

                case Parameter.Type.GameObject:
                {
                    FlexibleGameObject gameObjectParameter = _GameObjectParameters[argument.parameterIndex];
                    parameter.gameObjectValue = gameObjectParameter.value;
                }
                break;

                case Parameter.Type.Vector2:
                {
                    FlexibleVector2 vector2Parameter = _Vector2Parameters[argument.parameterIndex];
                    parameter.vector2Value = vector2Parameter.value;
                }
                break;

                case Parameter.Type.Vector3:
                {
                    FlexibleVector3 vector3Parameter = _Vector3Parameters[argument.parameterIndex];
                    parameter.vector3Value = vector3Parameter.value;
                }
                break;

                case Parameter.Type.Quaternion:
                {
                    FlexibleQuaternion quaternionParameter = _QuaternionParameters[argument.parameterIndex];
                    parameter.quaternionValue = quaternionParameter.value;
                }
                break;

                case Parameter.Type.Rect:
                {
                    FlexibleRect rectParameter = _RectParameters[argument.parameterIndex];
                    parameter.rectValue = rectParameter.value;
                }
                break;

                case Parameter.Type.Bounds:
                {
                    FlexibleBounds boundsParameter = _BoundsParameters[argument.parameterIndex];
                    parameter.boundsValue = boundsParameter.value;
                }
                break;

                case Parameter.Type.Color:
                {
                    FlexibleColor colorParameter = _ColorParameters[argument.parameterIndex];
                    parameter.colorValue = colorParameter.value;
                }
                break;

                case Parameter.Type.Transform:
                case Parameter.Type.RectTransform:
                case Parameter.Type.Rigidbody:
                case Parameter.Type.Rigidbody2D:
                case Parameter.Type.Component:
                {
                    FlexibleComponent componentParameter = _ComponentParameters[argument.parameterIndex];
                    parameter.objectReferenceValue = componentParameter.value;
                }
                break;

                case Parameter.Type.Variable:
                {
                    InputSlotTypable inputSlot = _InputSlots[argument.parameterIndex];
                    object           value     = null;
                    if (inputSlot.GetValue(ref value))
                    {
                        parameter.variableValue = value;
                    }
                }
                break;
                }
            }
        }
Ejemplo n.º 5
0
 void SerializeVer1()
 {
     _Toggle = (FlexibleComponent)_OldToggle;
     _Value  = (FlexibleBool)_OldValue;
 }
 internal void SerializeVer1()
 {
     _BoolValue2 = new FlexibleBool(true);
 }