コード例 #1
0
 public override void Reset()
 {
     source = null;
     format = "Vector2\\([x],[y]\\)";
     storeResult = null;
     everyFrame = false;
 }
コード例 #2
0
 public override void Reset()
 {
     vector2 = null;
     vector3 = null;
     zValue = null;
     everyFrame = false;
 }
コード例 #3
0
        public override void Reset()
        {
            base.Reset();

            wp = null;
            to = null;
        }
コード例 #4
0
		public override void Reset()
		{
			gameObject = null;
			anchor = null;
			anchorVector3 = new FsmVector3() {UseVariable=true};
			everyFrame = false;
		}
コード例 #5
0
ファイル: Flicked.cs プロジェクト: Jashengmato/TouchScript
 public override void Reset()
 {
     GameObject = null;
     Component = null;
     ScreenFlickVector = null;
     SendEvent = null;
 }
コード例 #6
0
ファイル: GetVector2XY.cs プロジェクト: SpacesAdventure/Kio-2
		public override void Reset()
		{
			vector2Variable = null;
			storeX = null;
			storeY = null;
			everyFrame = false;
		}
コード例 #7
0
 public override void Reset()
 {
     GameObject = null;
     Component = null;
     ScreenPosition = null;
     SendEvent = null;
 }
コード例 #8
0
		public override void Reset()
		{
			gameObject = null;
			screen = null;
			local = null;
			everyFrame = false;
		}
コード例 #9
0
    protected override void InitGDE()
    {
        FsmVariables vars = PlayMakerGlobals.Instance.Variables;
        if (isGDEInitialized == null)
            isGDEInitialized = vars.GetVariable("gde_initialized") as FsmBool;

        if (isGDEInitialized != null && isGDEInitialized.Value == true)
        {
            single_bool = vars.GetVariable("single_bool") as FsmBool;
            single_custom_bool = vars.GetVariable("single_custom_bool") as FsmBool;

            single_float = vars.GetVariable("single_float") as FsmFloat;
            single_custom_float = vars.GetVariable("single_custom_float") as FsmFloat;

            single_int = vars.GetVariable("single_int") as FsmInt;
            single_custom_int = vars.GetVariable("single_custom_int") as FsmInt;

            single_string = vars.GetVariable("single_string") as FsmString;
            single_custom_string = vars.GetVariable("single_custom_string") as FsmString;
            single_custom = vars.GetVariable("single_custom") as FsmString;

            single_vec2 = vars.GetVariable("single_vector2") as FsmVector2;
            single_custom_vec2 = vars.GetVariable("single_custom_vector2") as FsmVector2;

            single_vec3 = vars.GetVariable("single_vector3") as FsmVector3;
            single_custom_vec3 = vars.GetVariable("single_custom_vector3") as FsmVector3;

            single_color = vars.GetVariable("single_color") as FsmColor;
            single_custom_color = vars.GetVariable("single_custom_color") as FsmColor;
        }
    }
コード例 #10
0
 public override void Reset()
 {
     vector = null;
     x = new FsmFloat { UseVariable = true };
     y = new FsmFloat { UseVariable = true };
     everyFrame = false;
 }
コード例 #11
0
 public override void Reset()
 {
     fromVector = new FsmVector2 { UseVariable = true };
     toVector = new FsmVector2 { UseVariable = true };
     storeResult = null;
     everyFrame = true;
 }
コード例 #12
0
 public override void Reset()
 {
     vector2Variable = null;
     addVector = new FsmVector2 { UseVariable = true };
     everyFrame = false;
     perSecond = false;
 }
コード例 #13
0
 public override void Reset()
 {
     text = "Hello World!";
     color = null;
     scoreFlashInstance = null;
     worldPosition = null;
     screenOffset = null;
 }
コード例 #14
0
 public override void Reset()
 {
     texture = null;
     center = null;
     radius = 1;
     color = Color.red;
     everyFrame = false;
 }
コード例 #15
0
 public override void Reset()
 {
     gameObject = null;
     offset = null;
     offsetX = null;
     offsetY = null;
     everyFrame = false;
 }
コード例 #16
0
        public override void Reset()
        {
            vector2 = null;

            RadToDeg = true;
            everyFrame = false;
            angle = null;
        }
コード例 #17
0
 public override void Reset()
 {
     source = null;
     target = null;
     maxSpeed = 10f;
     finishDistance = 1f;
     finishEvent = null;
 }
コード例 #18
0
 public override void Reset()
 {
     vector2 = null;
     format = "Vector2([x],[y])";
     floatConversion = "G";
     storeResult = null;
     everyFrame = false;
 }
コード例 #19
0
 public override void Reset()
 {
     seed = new FsmInt(){UseVariable=true};
     storeResult = null;
     unitCircleRadius = 1;
     option = RandomUnitCircleOption.OnCirclePerimeter;
     everyFrame = false;
 }
コード例 #20
0
 public override void Reset()
 {
     vector2Variable = null;
     addX = 0;
     addY = 0;
     everyFrame = false;
     perSecond = false;
 }
コード例 #21
0
 public override void Reset()
 {
     mouseDeltaPosition = null;
     mousePositionDeltaVector2 = null;
     mouseDeltaPositionX = null;
     mouseDeltaPositionY =null;
     normalize = false;
 }
コード例 #22
0
 public override void Reset()
 {
     gameObjectHit = null;
     point = null;
     normal = null;
     distance = null;
     everyFrame = false;
 }
コード例 #23
0
		public override void Reset()
		{
			gameObject = null;
			input = null;
			angle = null;
			inputAndAngle = null;
			everyFrame = true;
		}
コード例 #24
0
		public override void Reset()
		{
			storeDidPickObject = null;
			storeGameObject = null;
			storePoint = null;
			layerMask = new FsmInt[0];
			invertMask = false;
			everyFrame = false;
		}
コード例 #25
0
 public override void Reset()
 {
     vector2Variable1 = null;
     vector2Variable2 = null;
     tolerance = 0f;
     equal = null;
     notEqual = null;
     everyFrame = false;
 }
コード例 #26
0
 public override void Reset()
 {
     fromVector = new FsmVector2 { UseVariable = true };
     toVector = new FsmVector2 { UseVariable = true };
     amount = null;
     lerpAgainstDeltaTime = false;
     storeResult = null;
     everyFrame = true;
 }
コード例 #27
0
        public override void Reset()
        {
            triangleIndex = null;
            textureCoord = null;
            textureCoord2 = null;
            lightmapCoord = null;

            everyFrame = false;
        }
コード例 #28
0
 public override void Reset()
 {
     vector1 = null;
     vector2 = null;
     operation = Vector2Operation.Add;
     storeVector2Result = null;
     storeFloatResult = null;
     everyFrame = false;
 }
コード例 #29
0
		public override void Reset()
		{
			base.Reset();
			gameObject = null;
			position = null;
			x = null;
			y = null;
			
		}
コード例 #30
0
ファイル: SetCursorMode.cs プロジェクト: gumbomasta/Off-Peak
		public override void Reset()
		{
			cursorTexture = null;
			hotSpot = new FsmVector2 { UseVariable = true };

			renderMode = RenderMode.Auto;
			lockMode = CurState.None;
			hideCursor = true;
		}
コード例 #31
0
 public override void Reset()
 {
     vector2Variable = null;
     maxLength       = null;
     everyFrame      = false;
 }
コード例 #32
0
 public override void Reset()
 {
     gameObject = null;
     target     = null;
 }
コード例 #33
0
 public override void Reset()
 {
     gameObject = null;
     fsmName    = "";
     setValue   = null;
 }
コード例 #34
0
 public override void Reset()
 {
     base.Reset();
     StoreResult = null;
 }
コード例 #35
0
 public override void Reset()
 {
     vector2Variable = null;
     snapAngle       = 15f;
     everyFrame      = false;
 }
コード例 #36
0
        public override void Reset()
        {
            base.Reset();

            gameObject = null;

            to = new FsmVector2 {
                UseVariable = false
            };
            duration = new FsmFloat {
                UseVariable = false
            };
            setSpeedBased = new FsmBool {
                UseVariable = false, Value = false
            };
            snapping = new FsmBool {
                UseVariable = false, Value = false
            };

            setRelative = new FsmBool {
                UseVariable = false, Value = false
            };

            playInReverse = new FsmBool {
                UseVariable = false, Value = false
            };
            setReverseRelative = new FsmBool {
                UseVariable = false, Value = false
            };

            startEvent        = null;
            finishEvent       = null;
            finishImmediately = new FsmBool {
                UseVariable = false, Value = false
            };

            stringAsId = new FsmString {
                UseVariable = false
            };
            tagAsId = new FsmString {
                UseVariable = false
            };

            startDelay = new FsmFloat {
                Value = 0
            };

            selectedEase = DOTweenActionsEnums.SelectedEase.EaseType;
            easeType     = Ease.Linear;

            loops = new FsmInt {
                Value = 0
            };
            loopType = LoopType.Restart;

            autoKillOnCompletion = new FsmBool {
                Value = true
            };
            recyclable = new FsmBool {
                Value = false
            };

            updateType          = UpdateType.Normal;
            isIndependentUpdate = new FsmBool {
                Value = false
            };

            debugThis = new FsmBool {
                Value = false
            };
        }
コード例 #37
0
 public override void Reset()
 {
     Vector2 = null;
     base.Reset();
 }
コード例 #38
0
    public static bool ApplyValueToFsmVar(Fsm fromFsm, FsmVar fsmVar, object value)
    {
        if (fromFsm == null)
        {
            return(false);
        }
        if (fsmVar == null)
        {
            return(false);
        }


        if (value == null)
        {
            if (fsmVar.Type == VariableType.Bool)
            {
                FsmBool _target = fromFsm.Variables.GetFsmBool(fsmVar.variableName);
                _target.Value = false;
            }
            else if (fsmVar.Type == VariableType.Color)
            {
                FsmColor _target = fromFsm.Variables.GetFsmColor(fsmVar.variableName);
                _target.Value = Color.black;
            }
            else if (fsmVar.Type == VariableType.Int)
            {
                FsmInt _target = fromFsm.Variables.GetFsmInt(fsmVar.variableName);
                _target.Value = 0;
            }
            else if (fsmVar.Type == VariableType.Float)
            {
                FsmFloat _target = fromFsm.Variables.GetFsmFloat(fsmVar.variableName);
                _target.Value = 0f;
            }
            else if (fsmVar.Type == VariableType.GameObject)
            {
                FsmGameObject _target = fromFsm.Variables.GetFsmGameObject(fsmVar.variableName);
                _target.Value = null;
            }
            else if (fsmVar.Type == VariableType.Material)
            {
                FsmMaterial _target = fromFsm.Variables.GetFsmMaterial(fsmVar.variableName);
                _target.Value = null;
            }
            else if (fsmVar.Type == VariableType.Object)
            {
                FsmObject _target = fromFsm.Variables.GetFsmObject(fsmVar.variableName);
                _target.Value = null;
            }
            else if (fsmVar.Type == VariableType.Quaternion)
            {
                FsmQuaternion _target = fromFsm.Variables.GetFsmQuaternion(fsmVar.variableName);
                _target.Value = Quaternion.identity;
            }
            else if (fsmVar.Type == VariableType.Rect)
            {
                FsmRect _target = fromFsm.Variables.GetFsmRect(fsmVar.variableName);
                _target.Value = new Rect(0, 0, 0, 0);
            }
            else if (fsmVar.Type == VariableType.String)
            {
                FsmString _target = fromFsm.Variables.GetFsmString(fsmVar.variableName);
                _target.Value = "";
            }
            else if (fsmVar.Type == VariableType.String)
            {
                FsmTexture _target = fromFsm.Variables.GetFsmTexture(fsmVar.variableName);
                _target.Value = null;
            }
            else if (fsmVar.Type == VariableType.Vector2)
            {
                FsmVector2 _target = fromFsm.Variables.GetFsmVector2(fsmVar.variableName);
                _target.Value = Vector2.zero;
            }
            else if (fsmVar.Type == VariableType.Vector3)
            {
                FsmVector3 _target = fromFsm.Variables.GetFsmVector3(fsmVar.variableName);
                _target.Value = Vector3.zero;
            }

            return(true);
        }

        System.Type valueType = value.GetType();

        //Debug.Log("valueType  "+valueType);

        System.Type storageType = null;

        //	Debug.Log("fsmVar type "+fsmVar.Type);

        switch (fsmVar.Type)
        {
        case VariableType.Int:
            storageType = typeof(int);
            break;

        case VariableType.Float:
            storageType = typeof(float);
            break;

        case VariableType.Bool:
            storageType = typeof(bool);
            break;

        case VariableType.Color:
            storageType = typeof(Color);
            break;

        case VariableType.GameObject:
            storageType = typeof(GameObject);
            break;

        case VariableType.Quaternion:
            storageType = typeof(Quaternion);
            break;

        case VariableType.Rect:
            storageType = typeof(Rect);
            break;

        case VariableType.String:
            storageType = typeof(string);
            break;

        case VariableType.Texture:
            storageType = typeof(Texture2D);
            break;

        case VariableType.Vector2:
            storageType = typeof(Vector2);
            break;

        case VariableType.Vector3:
            storageType = typeof(Vector3);
            break;

        case VariableType.Object:
            storageType = typeof(Object);
            break;

        case VariableType.Material:
            storageType = typeof(Material);
            break;
        }

        bool ok = true;

        if (!storageType.Equals(valueType))
        {
            ok = false;
            if (storageType.Equals(typeof(Object)))             // we are ok
            {
                ok = true;
            }

            if (!ok)
            {
                if (valueType.Equals(typeof(ProceduralMaterial)))                 // we are ok
                {
                    ok = true;
                }
                if (valueType.Equals(typeof(double)))                 // we are ok
                {
                    ok = true;
                }
                if (valueType.Equals(typeof(System.Int64)))                 // we are ok
                {
                    ok = true;
                }
            }
        }


        if (!ok)
        {
            Debug.LogError("The fsmVar value <" + storageType + "> doesn't match the value <" + valueType + ">");
            return(false);
        }


        if (valueType == typeof(bool))
        {
            FsmBool _target = fromFsm.Variables.GetFsmBool(fsmVar.variableName);
            _target.Value = (bool)value;
        }
        else if (valueType == typeof(Color))
        {
            FsmColor _target = fromFsm.Variables.GetFsmColor(fsmVar.variableName);
            _target.Value = (Color)value;
        }
        else if (valueType == typeof(int))
        {
            FsmInt _target = fromFsm.Variables.GetFsmInt(fsmVar.variableName);
            _target.Value = System.Convert.ToInt32(value);
        }
        else if (valueType == typeof(System.Int64))
        {
            if (fsmVar.Type == VariableType.Int)
            {
                FsmInt _target = fromFsm.Variables.GetFsmInt(fsmVar.variableName);
                _target.Value = System.Convert.ToInt32(value);
            }
            else if (fsmVar.Type == VariableType.Float)
            {
                FsmFloat _target = fromFsm.Variables.GetFsmFloat(fsmVar.variableName);
                _target.Value = System.Convert.ToSingle(value);
            }
        }
        else if (valueType == typeof(float))
        {
            FsmFloat _target = fromFsm.Variables.GetFsmFloat(fsmVar.variableName);
            _target.Value = (float)value;
        }
        else if (valueType == typeof(double))
        {
            FsmFloat _target = fromFsm.Variables.GetFsmFloat(fsmVar.variableName);
            _target.Value = System.Convert.ToSingle(value);
        }
        else if (valueType == typeof(GameObject))
        {
            FsmGameObject _target = fromFsm.Variables.GetFsmGameObject(fsmVar.variableName);
            _target.Value = (GameObject)value;
        }
        else if (valueType == typeof(Material))
        {
            FsmMaterial _target = fromFsm.Variables.GetFsmMaterial(fsmVar.variableName);
            _target.Value = (Material)value;
        }
        else if (valueType == typeof(ProceduralMaterial))
        {
            FsmMaterial _target = fromFsm.Variables.GetFsmMaterial(fsmVar.variableName);
            _target.Value = (ProceduralMaterial)value;
        }
        else if (valueType == typeof(Object) || storageType == typeof(Object))
        {
            FsmObject _target = fromFsm.Variables.GetFsmObject(fsmVar.variableName);
            _target.Value = (Object)value;
        }
        else if (valueType == typeof(Quaternion))
        {
            FsmQuaternion _target = fromFsm.Variables.GetFsmQuaternion(fsmVar.variableName);
            _target.Value = (Quaternion)value;
        }
        else if (valueType == typeof(Rect))
        {
            FsmRect _target = fromFsm.Variables.GetFsmRect(fsmVar.variableName);
            _target.Value = (Rect)value;
        }
        else if (valueType == typeof(string))
        {
            FsmString _target = fromFsm.Variables.GetFsmString(fsmVar.variableName);
            _target.Value = (string)value;
        }
        else if (valueType == typeof(Texture2D))
        {
            FsmTexture _target = fromFsm.Variables.GetFsmTexture(fsmVar.variableName);
            _target.Value = (Texture2D)value;
        }
        else if (valueType == typeof(Vector2))
        {
            FsmVector2 _target = fromFsm.Variables.GetFsmVector2(fsmVar.variableName);
            _target.Value = (Vector2)value;
        }
        else if (valueType == typeof(Vector3))
        {
            FsmVector3 _target = fromFsm.Variables.GetFsmVector3(fsmVar.variableName);
            _target.Value = (Vector3)value;
        }
        else
        {
            Debug.LogWarning("?!?!" + valueType);
            //  don't know, should I put in FsmObject?
        }


        return(true);
    }