示例#1
0
        protected override void Draw(GameTime gameTime)
        {
            Console.WriteLine("Draw Loop Begin");
//GraphicsDevice.Clear(Color.White);
            spriteBatch.Begin();

            foreach (Tile tile in Lists.TileList)
            {
                spriteBatch.Draw(TileTypes.determineTileTexture(tile), tile.centerCoord, Color.White);
            }



            spriteBatch.End();
            float frameRate = 1 / (float)gameTime.ElapsedGameTime.TotalSeconds; //calculates framerate

            Console.WriteLine("Framerate: " + frameRate);
            base.Draw(gameTime);
            Console.WriteLine("Draw Loop End");
            // Thread.Sleep(2000);
        }