Beispiel #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Beispiel #2
0
        public void Update(GameTime gameTime, Game1 game)
        {
            keyboardState = Keyboard.GetState();
            currentMouse = Mouse.GetState();

            if(currentMouse.ScrollWheelValue < previousMouseState)
            {
                scale -= .01f;

            }
            if(currentMouse.ScrollWheelValue > previousMouseState)
            {
                scale += .01f;
            }
            previousMouseState = currentMouse.ScrollWheelValue;
            center = new Vector2((game.curPos.X + (game.cursor.Width / 2)) - (game.width / 2), (game.curPos.Y + (game.cursor.Height / 2)) - (game.height / 2));

            transform = Matrix.CreateScale(new Vector3(scale, scale, 1)) * Matrix.CreateTranslation(new Vector3(-center.X, -center.Y, 0));
        }