class for bullet in Car_race game
Diff: Bullet.cpp
- Revision:
- 3:7015c77e39a2
- Parent:
- 2:b87e78ff82ca
- Child:
- 4:a32443aee8f8
--- a/Bullet.cpp Sat Apr 01 18:48:46 2017 +0000 +++ b/Bullet.cpp Fri Apr 07 10:56:15 2017 +0000 @@ -12,19 +12,18 @@ void Bullet::init(int bullet_x,int bullet_y) { - _size = 2; _bullet_x = bullet_x; _bullet_y = bullet_y; } void Bullet::draw(N5110 &lcd) { - lcd.drawRect(_bullet_x,_bullet_x,_size,_size,1); + lcd.drawRect(_bullet_x,_bullet_x,2,2,FILL_BLACK); } -void Bullet::update(Direction d,float mag) +void Bullet::update() { _bullet_x += 0; - _bullet_y += 1; + _bullet_y -= 1; } \ No newline at end of file