ELEC2645 (2018/19) / Mbed 2 deprecated el17szs

Dependencies:   mbed

Bat/Bat.cpp

Committer:
shahidsajid
Date:
2019-04-30
Revision:
22:69d7fe739872
Parent:
21:a0904159e183

File content as of revision 22:69d7fe739872:

#include "Bat.h"


Bat::Bat()
{

}

Bat::~Bat()
{

}
void Bat::init(int x,int y)
{   
    batPad.init();
    _x = 42;
    _y = 15;
    _hitBall=0;
    
}
void Bat::reset(){
    _hitBall=0;
    _loft_ball=0;
}
void Bat::draw(N5110 &lcd){
    lcd.drawLine(38,36,41,36,1);
    lcd.drawRect(41,35,6,3,FILL_BLACK);
    //ball1.draw();
}
int Bat::get_hitBall(UX &ux){
    _hitBall=ux.get_a_pressed();
    return _hitBall;
}
int Bat::get_loft_ball(UX &ux){
     _loft_ball=ux.get_l_pressed();
    return _loft_ball;
}