Simple Simon Discussion > SimonSquare Class

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

April 22, 2008 | Registered CommenterRob

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.

April 22, 2008 | Unregistered CommenterShawn

Curious, we can make that class in it's own file right? Would we leave everything public then like is done now?

April 22, 2008 | Unregistered CommenterShawn

Bit confused on the initializeScreenSizeInfo method, could you discuss that?

Thanks,

Shawn

April 27, 2008 | Unregistered CommenterShawn

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.

April 27, 2008 | Unregistered CommenterJDog

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.

May 2, 2008 | Unregistered CommenterTomas

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.

May 9, 2008 | Registered CommenterRob

I was part right, yay !

May 16, 2008 | Unregistered CommenterJDog