public WeenieError PerformMovement(MovementStruct mvs) { var result = WeenieError.None; switch (mvs.Type) { case MovementType.RawCommand: result = DoMotion(mvs.Motion, mvs.Params); break; case MovementType.InterpretedCommand: result = DoInterpretedMotion(mvs.Motion, mvs.Params); break; case MovementType.StopRawCommand: result = StopMotion(mvs.Motion, mvs.Params); break; case MovementType.StopInterpretedCommand: result = StopInterpretedMotion(mvs.Motion, mvs.Params); break; case MovementType.StopCompletely: result = StopCompletely(); break; default: return(WeenieError.GeneralMovementFailure); } PhysicsObj.CheckForCompletedMotions(); return(result); }
public Sequence PerformMovement(MovementStruct mvs) { Sequence sequence = null; switch (mvs.Type) { case MovementType.RawCommand: sequence = DoMotion(mvs.Motion, mvs.Params); break; case MovementType.InterpretedCommand: sequence = DoInterpretedMotion(mvs.Motion, mvs.Params); break; case MovementType.StopRawCommand: sequence = StopMotion(mvs.Motion, mvs.Params); break; case MovementType.StopInterpretedCommand: sequence = StopInterpretedMotion(mvs.Motion, mvs.Params); break; case MovementType.StopCompletely: sequence = StopCompletely(); break; default: sequence.ID = 71; return(sequence); } PhysicsObj.CheckForCompletedMotions(); return(sequence); }