Пример #1
0
        internal void DrawBall(Ball ball)
        {
            Vector2 screenPositions = camera.GetVisualPositions(ball.logicalPosition);

            int screenX = (int)screenPositions.X;
            int screenY = (int)screenPositions.Y;

            int ballSize = (int)camera.ball;

            this.rectangle = new Rectangle(screenX, screenY, ballSize, ballSize);

            spriteBatch.Begin();
            spriteBatch.Draw(texture, rectangle, Color.White);
            spriteBatch.End();
        }
Пример #2
0
 public BallSimulation()
 {
     ball = new Ball();
 }