class for bullet in Car_race game

Bullet.cpp

Committer:
fy14aaz
Date:
2017-04-01
Revision:
2:b87e78ff82ca
Parent:
1:6bd0cbdf15f7
Child:
3:7015c77e39a2

File content as of revision 2:b87e78ff82ca:

#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,1);
}

void Bullet::update(Direction d,float mag)
{
    _bullet_x += 0;
    _bullet_y += 1; 
    
}