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

Revision:
13:50779b12ff51
Parent:
8:82d88f9381f3
--- a/BlueMeanyObject.h	Mon Jun 10 20:02:28 2013 +0000
+++ b/BlueMeanyObject.h	Tue Jun 11 19:29:04 2013 +0000
@@ -32,13 +32,13 @@
     virtual ~BlueMeanyObject() {
     }
     
-        /*****************************/
-        /* GET TYPE OF ENEMY THIS IS */
-        /*****************************/
-        // Returns enemy type.
-        virtual EnemyType GetEnemyType( void ) {
-            return BlueMeany;
-        }
+    /*****************************/
+    /* GET TYPE OF ENEMY THIS IS */
+    /*****************************/
+    // Returns enemy type.
+    virtual EnemyType GetEnemyType( void ) {
+        return BlueMeany;
+    }
 
     /*******************************************************/
     /* GET NUMBER OF POINTS AWARDED FOR KILLING THIS ENEMY */
@@ -48,6 +48,16 @@
       return 0x10;  // BCD!
     }
 
+    /*****************************************************************/
+    /* PERFORM ANY INIITALISATION REQUIRED AT LEVEL START OR RESTART */
+    /*****************************************************************/
+    // Derived classes should override this if necessary.
+    virtual void LevelRestart( void ) {
+        // Bring Blue Meany to a halt at the start of the level.
+        hVelocity = 0;
+        vVelocity = 0;
+    }
+    
     /************************/
     /* MOVE THE GAME OBJECT */
     /************************/