示例#1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            camera = new Camera(graphics.GraphicsDevice.Viewport);
            gameArea = new Texture2D(graphics.GraphicsDevice, 1, 1);
            gameArea.SetData<Color>(new Color[]
                {
                    Color.White
                });

            smokeHandler = new SmokeHandler();
            gameView = new GameView(smokeHandler, graphics);
            smokeSprite = Content.Load<Texture2D>("particlesmoke");
            // TODO: use this.Content to load your game content here
        }
示例#2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            camera      = new Camera(graphics.GraphicsDevice.Viewport);
            gameArea    = new Texture2D(graphics.GraphicsDevice, 1, 1);
            gameArea.SetData <Color>(new Color[]
            {
                Color.White
            });

            smokeHandler = new SmokeHandler();
            gameView     = new GameView(smokeHandler, graphics);
            smokeSprite  = Content.Load <Texture2D>("particlesmoke");
            // TODO: use this.Content to load your game content here
        }
示例#3
0
 public GameView(SmokeHandler smokeHandler, GraphicsDeviceManager graphics)
 {
     screenSize = new Vector2(graphics.GraphicsDevice.Viewport.X, graphics.GraphicsDevice.Viewport.Y);
     smokeHandler = new SmokeHandler();
     this.smokeHandler = smokeHandler;
 }
示例#4
0
 public GameView(SmokeHandler smokeHandler, GraphicsDeviceManager graphics)
 {
     screenSize        = new Vector2(graphics.GraphicsDevice.Viewport.X, graphics.GraphicsDevice.Viewport.Y);
     smokeHandler      = new SmokeHandler();
     this.smokeHandler = smokeHandler;
 }