class for bullet in Car_race game
Bullet.cpp
- Committer:
- fy14aaz
- Date:
- 2017-03-31
- Revision:
- 1:6bd0cbdf15f7
- Parent:
- 0:aca013532788
- Child:
- 2:b87e78ff82ca
File content as of revision 1:6bd0cbdf15f7:
#include "Bullet.h" Bullet::Bullet() { } Bullet::~Bullet() { } 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,FILL_BLACK); } void Bullet::update(Direction d,float mag) { _bullet_x += 1; _bullet_y += 1; }