Example #1
0
        public MTSpawnState(MTSpawn action, GameObject target)
            : base(action, target)
        {
            ActionOne = action.ActionOne;
            ActionTwo = action.ActionTwo;

            ActionStateOne = (MTFiniteTimeActionState)ActionOne.StartAction(target);
            ActionStateTwo = (MTFiniteTimeActionState)ActionTwo.StartAction(target);
        }
Example #2
0
        public MTParallelState(MTParallel action, GameObject target)
            : base(action, target)
        {
            Actions = action.Actions;
            ActionStates = new MTFiniteTimeActionState[Actions.Length];

            for (int i = 0; i < Actions.Length; i++)
            {
                ActionStates [i] = (MTFiniteTimeActionState)Actions [i].StartAction (target);
            }
        }
Example #3
0
        protected internal override void Step(float dt)
        {
            InnerActionState.Step(dt);

            if (InnerActionState.IsDone)
            {
                float diff = InnerActionState.Elapsed - InnerActionState.Duration;
                InnerActionState = (MTFiniteTimeActionState)InnerAction.StartAction(Target);
                InnerActionState.Step(0f);
                InnerActionState.Step(diff);
            }
        }
Example #4
0
 public MTRepeatForeverState(MTRepeatForever action, GameObject target)
     : base(action, target)
 {
     InnerAction      = action.InnerAction;
     InnerActionState = (MTFiniteTimeActionState)InnerAction.StartAction(target);
 }
Example #5
0
 public MTReverseTimeState(MTReverseTime action, GameObject target)
     : base(action, target)
 {
     Other      = action.Other;
     OtherState = (MTFiniteTimeActionState)Other.StartAction(target);
 }
Example #6
0
 public MTActionEaseState(MTActionEase action, GameObject target) : base(action, target)
 {
     InnerActionState = (MTFiniteTimeActionState)action.InnerAction.StartAction(target);
 }
Example #7
0
        protected internal override void Step(float dt)
        {
            InnerActionState.Step (dt);

            if (InnerActionState.IsDone)
            {
                float diff = InnerActionState.Elapsed - InnerActionState.Duration;
                InnerActionState = (MTFiniteTimeActionState)InnerAction.StartAction (Target);
                InnerActionState.Step (0f);
                InnerActionState.Step (diff);
            }
        }