示例#1
0
 private void ApplyMovementOrder(ForwardMovementOrder movementOrder, double distanceToTravel)
 {
     Position += Vector2D.DirectionFromAngle(AngleInDegrees) * distanceToTravel;
     OnPropertyChanged("Position");
 }
示例#2
0
        private void ApplyWindDrift(IWind wind, TimeSpan timeStep)
        {
            var direction = Vector2D.DirectionFromAngle(wind.Angle);

            Position += direction * wind.Velocity * timeStep.TotalSeconds * DriftMultiplier;
        }