Esempio n. 1
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);
            entityController.RenderingUpdate(gameTime);
            // TODO: Add your drawing code here

            spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointWrap, null, null, null, Matrix.CreateScale(new Vector3(10, 10, 0)));
            spriteBatch.End();

            Texture2D texture = new Texture2D(GraphicsDevice, 1, 1);

            Color[] c = new Color[1];
            c[0] = Color.Black;
            texture.SetData(c);
            spriteBatch.Begin();

            spriteBatch.End();
            base.Draw(gameTime);
            //Drawing ui
            Imui.Begin();
            if (Imui.Button(10, 10, "PRESS ME", 10, 10, 1, 1))
            {
                Imui.Text(100, 100, "THANKS", 10, 10);
            }
            Imui.End();
        }
Esempio n. 2
0
 /// <summary>
 /// Allows the game to perform any initialization it needs to before starting to run.
 /// This is where it can query for any required services and load any non-graphic
 /// related content.  Calling base.Initialize will enumerate through any components
 /// and initialize them as well.
 /// </summary>
 protected override void Initialize()
 {
     // TODO: Add your initialization logic here
     entityController = new EntityController(GraphicsDevice);
     graphicsDevice   = GraphicsDevice;
     base.Initialize();
     Imui.Init();
 }