Exemplo n.º 1
0
        public override void Draw(GameTime gameTime)
        {
            #region OldDraw
            //GameRef.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, Matrix.Identity);
            //for (int y = 0; y < map.GetLength(0); y++)
            //{
            //    for (int x = 0; x < map.GetLength(1); x++)
            //    {
            //        GameRef.spriteBatch.Draw(
            //            tileset.Texture,
            //            new Rectangle(
            //                x * Engine.TileWidth,
            //                y * Engine.TileHeight,
            //                Engine.TileWidth,
            //                Engine.TileHeight),
            //                tileset.SourceRectangle[map[x,y]],
            //                Color.White);


            //        base.Draw(gameTime);
            //        GameRef.spriteBatch.End();
            //    }
            #endregion

            GameRef.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, Matrix.Identity);

            ObjManager.Draw(GameRef.spriteBatch);
            if (DevelopmentMode)
            {
                GameRef.spriteBatch.DrawString(menuFont, "Development Mode Active", new Vector2(20, 20), Color.Red);
                GameRef.spriteBatch.DrawString(menuFont, "Position x =" + Mouse.GetState().X.ToString() + "Position Y =  " + Mouse.GetState().Y.ToString() + "", new Vector2(40, 40), Color.White);
                GameRef.spriteBatch.DrawString(menuFont, "Time" + StoryTime.ToString(), new Vector2(60, 60), Color.Red);


                GridLine.renderGrid(GameRef.spriteBatch);
                Grid.Draw(GameRef.spriteBatch);
            }

            GameRef.spriteBatch.End();
        }