ECE 4180 Final

Dependencies:   mbed wave_player mbed-rtos C12832_lcd 4DGL-uLCD-SE LCD_fonts SDFileSystem

Committer:
yqin70
Date:
Sun Dec 08 02:18:30 2019 +0000
Revision:
21:cbcbb3480cad
Parent:
20:7d56cdcbc9a5
somewhat done(pushbutton added, has an issue where if you spam the touchpad, it'll increase your score even if there is no bubble).

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jcrane32 19:d65f9fb1023b 1 #ifndef bubble_hpp
jcrane32 19:d65f9fb1023b 2 #define bubble_hpp
jcrane32 19:d65f9fb1023b 3
jcrane32 19:d65f9fb1023b 4 #include "globals.h"
jcrane32 19:d65f9fb1023b 5
jcrane32 19:d65f9fb1023b 6 class Bubble
jcrane32 19:d65f9fb1023b 7 {
jcrane32 19:d65f9fb1023b 8 public:
jcrane32 19:d65f9fb1023b 9 Bubble(int x, int y);
jcrane32 19:d65f9fb1023b 10 void draw();
jcrane32 19:d65f9fb1023b 11 void moveDown();
jcrane32 19:d65f9fb1023b 12 int getYpos();
jcrane32 19:d65f9fb1023b 13 void clear();
jcrane32 19:d65f9fb1023b 14
jcrane32 19:d65f9fb1023b 15 private:
jcrane32 19:d65f9fb1023b 16 void update();
jcrane32 19:d65f9fb1023b 17 int xpos;
jcrane32 19:d65f9fb1023b 18 int ypos;
jcrane32 19:d65f9fb1023b 19 int newypos;
jcrane32 19:d65f9fb1023b 20
jcrane32 19:d65f9fb1023b 21 // these may need to be adjusted to prevent weird visual artifacts if
jcrane32 19:d65f9fb1023b 22 // bubbles collide
jcrane32 20:7d56cdcbc9a5 23 const static int bubbleSpeed = 15;
jcrane32 20:7d56cdcbc9a5 24 const static int bubbleRadius = 10;
jcrane32 19:d65f9fb1023b 25 };
jcrane32 19:d65f9fb1023b 26
jcrane32 19:d65f9fb1023b 27 #endif //bubble_hpp