Beispiel #1
0
            private static void CalculateRectAfterMove(PlayerPlane entity)
            {
                var pointAfterVerticalMovement = new Vector2D(entity.Get <Rectangle>().TopLeft.X,
                                                              entity.Get <Rectangle>().TopLeft.Y + entity.Get <Velocity2D>().velocity.Y *Time.Delta);

                entity.Set(new Rectangle(pointAfterVerticalMovement, entity.Get <Rectangle>().Size));
            }
Beispiel #2
0
 private static void CHeckIfHittingABorder(PlayerPlane entity)
 {
     if (entity.defeated)
     {
         return;
     }
     isHittingABorder = false;
     drawArea         = entity.Get <Rectangle>();
     movementSpeed    = entity.Get <Velocity2D>();
     CheckStopTopBorder(ScreenSpace.Current.Viewport);
     CheckStopBottomBorder(ScreenSpace.Current.Viewport);
     entity.Set(drawArea);
     entity.Set(movementSpeed);
 }
Beispiel #3
0
			private static void CHeckIfHittingABorder(PlayerPlane entity)
			{
				if (entity.defeated)
					return;
				isHittingABorder = false;
				drawArea = entity.Get<Rectangle>();
				movementSpeed = entity.Get<Velocity2D>();
				CheckStopTopBorder(ScreenSpace.Current.Viewport);
				CheckStopBottomBorder(ScreenSpace.Current.Viewport);
				entity.Set(drawArea);
				entity.Set(movementSpeed);
			}
Beispiel #4
0
			private static void CalculateRectAfterMove(PlayerPlane entity)
			{
				var pointAfterVerticalMovement = new Vector2D(entity.Get<Rectangle>().TopLeft.X,
					entity.Get<Rectangle>().TopLeft.Y + entity.Get<Velocity2D>().velocity.Y * Time.Delta);
				entity.Set(new Rectangle(pointAfterVerticalMovement, entity.Get<Rectangle>().Size));
			}