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