public void InjectKeyUp( SharpInputSystem.KeyEventArgs e )
{
// keep track of the player's intended direction
if ( e.Key == SharpInputSystem.KeyCode.Key_W && keyDirection.z == -1 )
keyDirection.z = 0;
else if ( e.Key == SharpInputSystem.KeyCode.Key_A && keyDirection.x == -1 )
keyDirection.x = 0;
else if ( e.Key == SharpInputSystem.KeyCode.Key_S && keyDirection.z == 1 )
keyDirection.z = 0;
else if ( e.Key == SharpInputSystem.KeyCode.Key_D && keyDirection.x == 1 )
keyDirection.x = 0;
if ( keyDirection.IsZeroLength && baseAnimID == AnimationID.RunBase )
{
// start running if not already moving and the player wants to move
SetBaseAnimation( AnimationID.IdleBase, true );
if ( topAnimID == AnimationID.RunTop )
SetTopAnimation( AnimationID.IdleTop, true );
}
}