public override bool Run() { try { StateMachineClient client = StateMachineClient.Acquire(Actor, "single_animation"); client.SetActor("x", Actor); client.EnterState("x", "Enter"); Definition definition = InteractionDefinition as Definition; Sim.AnimationClipDataForCAS rcas = definition.mAnimation; while (!Actor.HasExitReason(~(ExitReason.Replan | ExitReason.MidRoutePushRequested | ExitReason.ObjectStateChanged | ExitReason.PlayIdle | ExitReason.MaxSkillPointsReached))) { if (!AnimationTone.ControlLoop(this)) { break; } client.SetParameter("AnimationClip", rcas.AnimationClipName, rcas.ProductVersion); client.RequestState("x", "Animate"); client.RequestState(false, "x", "Enter"); } return(true); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); } return(false); }
public Definition(Sim.AnimationClipDataForCAS animation, string type) { mAnimation = animation; mType = type; }