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.cpp
- Committer:
- RichardE
- Date:
- 2013-06-17
- Revision:
- 18:70190f956a24
- Parent:
- 7:e72691603fd3
File content as of revision 18:70190f956a24:
/* * SOURCE FILE : BrainBulletObject.cpp * * Definition of class BrainBulletObject. * */ #include "BrainBulletObject.h" /***************/ /* CONSTRUCTOR */ /***************/ BrainBulletObject::BrainBulletObject() : HVelocity( 0 ), VVelocity( 0 ) { DeleteWhenRestricted = true; RetainOnLevelRestart = false; PixelWidth = 4; PixelHeight = 4; } /************************/ /* DRAW THE GAME OBJECT */ /************************/ // Note if Visible is false this should not draw anything // and/or hide the visible object. void BrainBulletObject::Draw( Gameduino *gd ) { gd->sprite( SpriteNumber, ToPixel( Xco ), ToPixel( Yco ), BrainBulletImage, 0, Gameduino::None, BadGuy ); } /************************/ /* MOVE THE GAME OBJECT */ /************************/ void BrainBulletObject::ProtectedMove( void ) { Xco += HVelocity; Yco += VVelocity; }