class for bullet in Car_race game
Bullet.cpp
- Committer:
- fy14aaz
- Date:
- 2017-04-07
- Revision:
- 3:7015c77e39a2
- Parent:
- 2:b87e78ff82ca
- Child:
- 4:a32443aee8f8
File content as of revision 3:7015c77e39a2:
#include "Bullet.h" Bullet::Bullet() { } Bullet::~Bullet() { } void Bullet::init(int bullet_x,int bullet_y) { _bullet_x = bullet_x; _bullet_y = bullet_y; } void Bullet::draw(N5110 &lcd) { lcd.drawRect(_bullet_x,_bullet_x,2,2,FILL_BLACK); } void Bullet::update() { _bullet_x += 0; _bullet_y -= 1; }