Example #1
0
 private void UpdateHeading()
 {
     if (!(_turnLeft ^ _turnRight))
     {
         _heading.DegreesPerSecond(0f);
     }
     if (_turnLeft)
     {
         _heading.DegreesPerSecond(-_turnSpeed);
     }
     if (_turnRight)
     {
         _heading.DegreesPerSecond(_turnSpeed);
     }
     _heading.Tick();
 }
Example #2
0
        private SteerableDirection Build()
        {
            var steerableDirection = new SteerableDirection(_forward);

            steerableDirection.DegreesPerSecond(_degreesPerSecond);
            return(steerableDirection);
        }