ECE 4180 Final
Dependencies: mbed wave_player mbed-rtos C12832_lcd 4DGL-uLCD-SE LCD_fonts SDFileSystem
Bubble.cpp
- Committer:
- jcrane32
- Date:
- 2019-12-06
- Revision:
- 19:d65f9fb1023b
File content as of revision 19:d65f9fb1023b:
#include "Bubble.hpp" Bubble::Bubble(int x, int y) { xpos = x; ypos = y; } void Bubble::draw() { uLCD.filled_circle(xpos, ypos, bubbleRadius, 0x000000); uLCD.filled_circle(xpos, newypos, bubbleRadius, 0xFFFFFF); update(); } void Bubble::clear() { uLCD.filled_circle(xpos, newypos, bubbleRadius, 0x000000); } void Bubble::update() { ypos = newypos; } void Bubble::moveDown() { newypos += bubbleSpeed; } int Bubble::getYpos() { return ypos; }