Ejemplo n.º 1
0
 public MTScaleByState(MTScaleTo action, GameObject target)
     : base(action, target)
 {
     DeltaX = StartScaleX * EndScaleX - StartScaleX;
     DeltaY = StartScaleY * EndScaleY - StartScaleY;
     DeltaZ = StartScaleZ * EndScaleZ - StartScaleZ;
 }
Ejemplo n.º 2
0
 public MTScaleByState(MTScaleTo action, GameObject target)
     : base(action, target)
 {
     DeltaX = StartScaleX * EndScaleX - StartScaleX;
     DeltaY = StartScaleY * EndScaleY - StartScaleY;
     DeltaZ = StartScaleZ * EndScaleZ - StartScaleZ;
 }
Ejemplo n.º 3
0
        public MTScaleToState(MTScaleTo action, GameObject target)
            : base(action, target)
        {
            StartScaleX = target.transform.localScale.x;
            StartScaleY = target.transform.localScale.y;
            StartScaleZ = target.transform.localScale.z;

            EndScaleX = action.EndScaleX;
            EndScaleY = action.EndScaleY;
            EndScaleZ = action.EndScaleZ;

            DeltaX = EndScaleX - StartScaleX;
            DeltaY = EndScaleY - StartScaleY;
            DeltaZ = EndScaleZ - StartScaleZ;
        }
Ejemplo n.º 4
0
        public MTScaleToState(MTScaleTo action, GameObject target)
            : base(action, target)
        {
            StartScaleX = target.transform.localScale.x;
            StartScaleY = target.transform.localScale.y;
            StartScaleZ = target.transform.localScale.z;

            EndScaleX = action.EndScaleX;
            EndScaleY = action.EndScaleY;
            EndScaleZ = action.EndScaleZ;

            DeltaX = EndScaleX - StartScaleX;
            DeltaY = EndScaleY - StartScaleY;
            DeltaZ = EndScaleZ - StartScaleZ;
        }
Ejemplo n.º 5
0
    void OnGUI()
    {
        if (GUILayout.Button ("MoveTo")) {
            resetObject ();
            var moveBy = new MTMoveBy(1,new Vector3(0,10,0));
            this.RunAction (moveBy);
        }

        if (GUILayout.Button("FadeOut"))
        {
            resetObject();
             var fadeOut = new MTFadeOut(2);
             this.RunActions(fadeOut);
        }

        if (GUILayout.Button ("FadeIn")) {
            resetObject ();
            var fadeIn = new MTFadeIn (2);
            this.RunAction (fadeIn);
        }

        if (GUILayout.Button("ScaleTo"))
        {
            resetObject();
            var scaleTo = new MTScaleTo(2,2,3,4);
            this.RunActions(scaleTo);

        }

        if(GUILayout.Button("JumpTo")){
            resetObject();
            var jumpTo = new MTJumpTo(2,new Vector3(0,0,0),2,3);
            this.RunAction(jumpTo);
        }

        if (GUILayout.Button ("Tint to")) {
            resetObject ();

            var TintTo = new MTTintTo (3f, 0.2f, 1f, 3f);

            this.RunAction (TintTo);

        }

        //		if (GUILayout.Button ("RotateTo")) {
        //			resetObject ();
        ////			var roTo = new MTRotateTo (2, 3,2,3);
        ////			this.RunAction (roTo);
        //
        //		}

        if (GUILayout.Button ("Sequence")) {
            resetObject ();
            var moveTo = new MTMoveTo (2, new Vector3 (10, 10, 10));
            var moveBy = new MTMoveBy(1,new Vector3(-1,1,-3));
            var jumpTo = new MTJumpTo(2,new Vector3(0,0,0),2,3);
            var TintTo = new MTTintTo (3f, 0.2f, 1f, 3f);

            this.RunActions(moveTo,moveBy,jumpTo,TintTo);

        }

        if (GUILayout.Button ("Spawn")) {
            resetObject ();

            var jumpTo = new MTJumpTo(2,new Vector3(0,0,0),2,3);
            var TintTo = new MTTintTo (3f, 0.2f, 1f, 3f);
        //			var roTo = new MTRotateTo (2, 3,2,3);
            var spawn = new MTSpawn(jumpTo,TintTo);

            this.RunActions(spawn);

        }

        if (GUILayout.Button("Hide"))
        {
            resetObject();
            var hide = new MTHide();
            this.RunActions(hide);
        }

        if (GUILayout.Button("Show"))
        {
            resetObject();
            var show = new MTShow();
            this.RunActions(show);
        }
    }
Ejemplo n.º 6
0
        public static MTScaleTo Create(float duration, float scale)
        {
            var action = new MTScaleTo(duration, scale);

            return(action);
        }