Reham Faqehi / Mbed 2 deprecated fy15raf

Dependencies:   mbed

Fork of fy15raf by ELEC2645 (2017/18)

Rocket/Rocket.cpp

Committer:
RehamFaqehi
Date:
2018-04-18
Revision:
2:3fd0d3d69556
Child:
3:489437d4ebd7

File content as of revision 2:3fd0d3d69556:

#include "Rocket.h"

// nothing doing in the constructor and destructor
Rocket::Rocket()
{

}

Rocket::~Rocket()
{

}

void Rocket::init()
{
    _x = WIDTH/2 ;  
    _y = HEIGHT/2 ;
    _speed = 1;  
}

void Rocket::draw(N5110 &lcd)
{
   int sprite[7][10] =   {
    
    { 0,1,1,1,1,0,0,0,0,0, },
    { 0,0,1,0,0,1,1,0,0,0, },
    { 0,0,0,1,0,0,0,1,1,0, },
    { 0,0,0,1,1,1,1,1,1,1, },
    { 0,0,0,1,0,0,0,1,1,0, },
    { 0,0,1,0,0,1,1,0,0,0, },
    { 0,1,1,1,1,0,0,0,0,0, },
};
    lcd.drawSprite(_x,_y,7,10,(int *)sprite);
}