Simple Simon Discussion > SimonSquare Class
Taking a stab at this:
SimonSquare class is basically a container for the 4 different squares on the screen at any one time. Each is assigned an appropriate color based on the constructor call, and has a Texture2D that is loaded from the LoadContent function in the Game1 class.
Curious, we can make that class in it's own file right? Would we leave everything public then like is done now?
Bit confused on the initializeScreenSizeInfo method, could you discuss that?
Thanks,
Shawn
Pretty sure the ScreenSizeInfo would be used for scaling of squares depending on the resolution of peoples monitors. Pretty sure it comes as standard.
Ah well, i'll wait and see depending on how Rob replies to peoples comments.
It is a blueprint for a single (Simon)square, and used for beeing able to draw the 4 squares in the (squares)list on the screen with two different colors and a texture, I'm guessing you are tinting the texture into the specfic color you want.
The SimonSquare class holds all the information about a single square on the screen. It tells the game where to draw it (SquareRectangle) the texture to use (SquareTexture) and the "bright" and "dark" colours to be used to light the square up. Four instances of the SimonSquare class are created in the LoadContent method and references to them are put in the Squares array.
I'll add some more comments to the initializeScreenSizeInfo method for the next version. Essentially it sets up a bunch of values that I can use to represent the area of the screen that the game is allowed to use.
I was part right, yay !



Describe what the SimonSquares class is, and what it is for.