示例#1
0
 public void Move(Key k)
 {
     currentKey = k;
     _direction = DirectionControl.GetDirection(k);
     DirectionControl.SetKeyDown(_direction);
     _timer.Start();
 }
示例#2
0
        internal void Stop(Key k)
        {
            var key = DirectionControl.GetDirection(k);

            DirectionControl.StopKeyPress(key);

            if (DirectionControl.AllKeysLifted())
            {
                _timer.Stop();
            }
        }