示例#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);
        }
示例#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);
            }
        }
示例#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);
            }
        }
示例#4
0
 public MTRepeatForeverState(MTRepeatForever action, GameObject target)
     : base(action, target)
 {
     InnerAction      = action.InnerAction;
     InnerActionState = (MTFiniteTimeActionState)InnerAction.StartAction(target);
 }
示例#5
0
 public MTReverseTimeState(MTReverseTime action, GameObject target)
     : base(action, target)
 {
     Other      = action.Other;
     OtherState = (MTFiniteTimeActionState)Other.StartAction(target);
 }
示例#6
0
 public MTActionEaseState(MTActionEase action, GameObject target) : base(action, target)
 {
     InnerActionState = (MTFiniteTimeActionState)action.InnerAction.StartAction(target);
 }
示例#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);
            }
        }