You never Initialise the bricks object.
You need to call bricks.Initialise();
function somewhere (preferably in the initialise function of the Breakout
class).
I would also recommend you to use a bit cleaner code standard.
Class names usually start with upper case, ie: Bricks
instead of bricks
, in your case, the class and the instance of the class have the same name (bricks
) which could create confusion and even should create a compiler error (I think?).
(The 'NewTexture' variable in the constructor of the brick
class also suffer from bad naming, should probably rather be named newTexture
, especially due to the fact that the Rect is called newRectangle
, - but this is not a code-review site, so ill leave that issue for now!).