public static PlayerMoveState GetMoveState(PlayerManager.MoveState pState) { PlayerManager pMan = PlayerManager.PrivGetInstance(); Debug.Assert(pMan != null); PlayerMoveState toReturn = null; switch (pState) { case MoveState.PlayerMoveNormal: toReturn = pMan.poNormalState; break; case MoveState.PlayerHitLeftWall: toReturn = pMan.poHitLeftState; break; case MoveState.PlayerHitRightWall: toReturn = pMan.poHitRightState; break; default: Debug.Assert(false); break; } Debug.Assert(toReturn != null); return(toReturn); }
public void SetMoveState(PlayerManager.MoveState pState) { this.pMoveState = PlayerManager.GetMoveState(pState); }