I have been following along in the book and was trying to put just the code from the first part of chapt 2 in my project to run just the TestMenuSprites unit test. I was also looking at the download source so I did not miss anything I may need for that part. I loaded the 3 sprites, did the spriteBatch code, put in the Rectangle constants, implemented the TestMenuSprites method, and the TestDelegate, TestPongGame class, StartGame method, the two overloaded RenderSprite method stubs, change program.cs to call StartGame or TestMenuSprites based on which one is not commented out. At this point in the chapter I should be able to press F5 and see a screen with just the SpaceBackground image. But I get an error about the width and height parameters in this code:
Code:
spritBatch.Draw(backgroudTexture, new Rectangle(0, 0, width, height), Color.LightGray);
There are two errors, one for each of those parameters that state "The name 'width/height' does not exist in the current context"
I can't debug this since it will not compile to have an executable to debug. I have search through the downloaded code and even compiled the downloaded code and I can't figure out what I'm doing wrong in my project. Any help is greatly appreciated.
Very Confused
jnbutler