Version of Robotron arcade game using LPC1768, a Gameduino shield, a serial EEPROM (for high scores), two microswitch joysticks and two buttons plus a box to put it in. 20 levels of mayhem.
Dependencies: 25LCxxx_SPI CommonTypes Gameduino mbed
Diff: GameObject.h
- Revision:
- 5:0b0651ac7832
- Parent:
- 4:673eb9735d44
- Child:
- 6:8bbdb70bc11c
--- a/GameObject.h Sat Jun 08 11:24:05 2013 +0000 +++ b/GameObject.h Sat Jun 08 14:40:47 2013 +0000 @@ -62,10 +62,10 @@ // Indicates which Gameduino sprite is being used for this object. UInt8 SpriteNumber; - // Determines if object is retained on a level restart. - // Most enemy objects are retained on a level restart, although their positions change. - // However, enemy bullets (for example) are killed off on a level restart. - bool RetainOnLevelRestart; + // Determines if object is retained on a level restart. + // Most enemy objects are retained on a level restart, although their positions change. + // However, enemy bullets (for example) are killed off on a level restart. + bool RetainOnLevelRestart; /***************/ /* CONSTRUCTOR */ @@ -81,7 +81,7 @@ DeleteWhenRestricted( false ), RestrictionFlags( 0 ), SpriteNumber( 0 ), - RetainOnLevelRestart( true ) + RetainOnLevelRestart( true ) { } @@ -172,9 +172,10 @@ /************************/ /* DRAW THE GAME OBJECT */ /************************/ + // Pass pointer to Gameduino to draw on in gd. // Note if Visible is false this should not draw anything // and/or hide the visible object. - virtual void Draw( void ) = 0; + virtual void Draw( Gameduino *gd ) = 0; /**********************************/ /* INITIALISE AN ARRAY OF OBJECTS */