![](/media/cache/profiles/859bf1416b8b8761c5d588dee78dc65f.50x50_q85.jpg)
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
BrainBulletObject.h@18:70190f956a24, 2013-06-17 (annotated)
- Committer:
- RichardE
- Date:
- Mon Jun 17 15:10:43 2013 +0000
- Revision:
- 18:70190f956a24
- Parent:
- 7:e72691603fd3
Improved response to button 1 when entering high scores (HighScoreEntry.cpp).
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
RichardE | 7:e72691603fd3 | 1 | /* |
RichardE | 7:e72691603fd3 | 2 | * SOURCE FILE : BrainBulletObject.h |
RichardE | 7:e72691603fd3 | 3 | * |
RichardE | 7:e72691603fd3 | 4 | * Definition of class BrainBulletObject. |
RichardE | 7:e72691603fd3 | 5 | * This is the enemy object used as a bullet fired by BrainObject enemies. |
RichardE | 7:e72691603fd3 | 6 | * |
RichardE | 7:e72691603fd3 | 7 | */ |
RichardE | 7:e72691603fd3 | 8 | |
RichardE | 7:e72691603fd3 | 9 | #ifndef BrainBulletObjectDefined |
RichardE | 7:e72691603fd3 | 10 | |
RichardE | 7:e72691603fd3 | 11 | #define BrainBulletObjectDefined |
RichardE | 7:e72691603fd3 | 12 | |
RichardE | 7:e72691603fd3 | 13 | #include "EnemyObject.h" |
RichardE | 7:e72691603fd3 | 14 | |
RichardE | 7:e72691603fd3 | 15 | class BrainBulletObject : public EnemyObject { |
RichardE | 7:e72691603fd3 | 16 | |
RichardE | 7:e72691603fd3 | 17 | public : |
RichardE | 7:e72691603fd3 | 18 | |
RichardE | 7:e72691603fd3 | 19 | // Horizontal and vertical velocities at which bullet is moving. |
RichardE | 7:e72691603fd3 | 20 | // NOT pixel velocities. |
RichardE | 7:e72691603fd3 | 21 | Int16 HVelocity, VVelocity; |
RichardE | 7:e72691603fd3 | 22 | |
RichardE | 7:e72691603fd3 | 23 | /***************/ |
RichardE | 7:e72691603fd3 | 24 | /* CONSTRUCTOR */ |
RichardE | 7:e72691603fd3 | 25 | /***************/ |
RichardE | 7:e72691603fd3 | 26 | BrainBulletObject(); |
RichardE | 7:e72691603fd3 | 27 | |
RichardE | 7:e72691603fd3 | 28 | /*****************************/ |
RichardE | 7:e72691603fd3 | 29 | /* GET TYPE OF ENEMY THIS IS */ |
RichardE | 7:e72691603fd3 | 30 | /*****************************/ |
RichardE | 7:e72691603fd3 | 31 | // Returns enemy type. |
RichardE | 7:e72691603fd3 | 32 | virtual EnemyType GetEnemyType( void ) { |
RichardE | 7:e72691603fd3 | 33 | return BrainBullet; |
RichardE | 7:e72691603fd3 | 34 | } |
RichardE | 7:e72691603fd3 | 35 | |
RichardE | 7:e72691603fd3 | 36 | /*******************************************************/ |
RichardE | 7:e72691603fd3 | 37 | /* GET NUMBER OF POINTS AWARDED FOR KILLING THIS ENEMY */ |
RichardE | 7:e72691603fd3 | 38 | /*******************************************************/ |
RichardE | 7:e72691603fd3 | 39 | // Returns number of points (in BCD). |
RichardE | 7:e72691603fd3 | 40 | virtual UInt8 GetPoints( void ) { |
RichardE | 7:e72691603fd3 | 41 | return 0x10; |
RichardE | 7:e72691603fd3 | 42 | } |
RichardE | 7:e72691603fd3 | 43 | |
RichardE | 7:e72691603fd3 | 44 | /************************/ |
RichardE | 7:e72691603fd3 | 45 | /* DRAW THE GAME OBJECT */ |
RichardE | 7:e72691603fd3 | 46 | /************************/ |
RichardE | 7:e72691603fd3 | 47 | // Note if Visible is false this should not draw anything |
RichardE | 7:e72691603fd3 | 48 | // and/or hide the visible object. |
RichardE | 7:e72691603fd3 | 49 | virtual void Draw( Gameduino *gd ); |
RichardE | 7:e72691603fd3 | 50 | |
RichardE | 7:e72691603fd3 | 51 | protected : |
RichardE | 7:e72691603fd3 | 52 | |
RichardE | 7:e72691603fd3 | 53 | /************************/ |
RichardE | 7:e72691603fd3 | 54 | /* MOVE THE GAME OBJECT */ |
RichardE | 7:e72691603fd3 | 55 | /************************/ |
RichardE | 7:e72691603fd3 | 56 | virtual void ProtectedMove( void ); |
RichardE | 7:e72691603fd3 | 57 | |
RichardE | 7:e72691603fd3 | 58 | }; |
RichardE | 7:e72691603fd3 | 59 | |
RichardE | 7:e72691603fd3 | 60 | #endif |
RichardE | 7:e72691603fd3 | 61 | |
RichardE | 7:e72691603fd3 | 62 | /* END of BrainBulletObject.h */ |