public InterpretedMotionState InqInterpretedMotionState() { if (MotionInterpreter == null) { MotionInterpreter = MotionInterp.Create(PhysicsObj, WeenieObj); if (PhysicsObj != null) { MotionInterpreter.enter_default_state(); } } return(MotionInterpreter.InterpretedState); }
public MotionInterp get_minterp() { if (MotionInterpreter == null) { MotionInterpreter = MotionInterp.Create(PhysicsObj, WeenieObj); if (PhysicsObj != null) { MotionInterpreter.enter_default_state(); } } return(MotionInterpreter); }
public void move_to_interpreted_state(InterpretedMotionState state) { if (MotionInterpreter == null) { MotionInterpreter = MotionInterp.Create(PhysicsObj, WeenieObj); if (PhysicsObj != null) { MotionInterpreter.enter_default_state(); } } MotionInterpreter.move_to_interpreted_state(state); }
public void EnterDefaultState() { if (PhysicsObj == null) { return; } if (MotionInterpreter == null) { MotionInterpreter = MotionInterp.Create(PhysicsObj, WeenieObj); } MotionInterpreter.enter_default_state(); }
public WeenieError PerformMovement(MovementStruct mvs) { PhysicsObj.set_active(true); switch (mvs.Type) { case MovementType.RawCommand: case MovementType.InterpretedCommand: case MovementType.StopRawCommand: case MovementType.StopInterpretedCommand: case MovementType.StopCompletely: if (MotionInterpreter == null) { MotionInterpreter = MotionInterp.Create(PhysicsObj, WeenieObj); if (PhysicsObj != null) { MotionInterpreter.enter_default_state(); } } return(MotionInterpreter.PerformMovement(mvs)); case MovementType.MoveToObject: case MovementType.MoveToPosition: case MovementType.TurnToObject: case MovementType.TurnToHeading: if (MoveToManager == null) { MoveToManager = MoveToManager.Create(PhysicsObj, WeenieObj); } return(MoveToManager.PerformMovement(mvs)); default: return(WeenieError.GeneralMovementFailure); } }