private void AdjustDepth(int state) { switch (state & StateMachine.DepthMask) { case StateMachine.DepthUp: this.recordDepth ++; break; case StateMachine.DepthDown: this.recordDepth --; break; default: break; } }