Mezmure Dargie / Mbed 2 deprecated SPACERACERS

Dependencies:   4DGL-uLCD-SE PinDetect mbed wave_player

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Shoot.h Source File

Shoot.h

00001 #include "uLCD_4DGL.h"
00002 
00003 extern uLCD_4DGL uLCD;
00004 class Shoot
00005 {
00006     public: 
00007     int x;
00008     int y;
00009     bool alive;
00010     Shoot(int shipX, int shipY){
00011         x = shipX;
00012         y = shipY;
00013         alive = false;
00014         }
00015     
00016 void draw() {
00017         uLCD.filled_rectangle(x-1 , y , x+1 , y-7, RED); 
00018     }
00019     
00020 void erase() {
00021         uLCD.filled_rectangle(x-1 , y , x+1 , y-7, BLACK); 
00022     }
00023         
00024 };