test 1 doc

Dependencies:   mbed Gamepad2

Engine/Engine.cpp

Committer:
joebarhouch
Date:
2020-05-18
Revision:
4:cf5088ace087
Parent:
3:e4e1cbf750b6
Child:
5:928c2eee4109

File content as of revision 4:cf5088ace087:

#include "Engine.h"

Engine::Engine()
{

}
Engine::~Engine()
{

}

void Engine::init()
{
    //init coord
    _px = WIDTH / 2;
    _py = HEIGHT / 2;

    //init call
    _p.init(_px, _py);
}

void Engine::read_input(Gamepad &pad)
{
    _d = pad.get_direction();
    _mag = pad.get_mag();
}

void Engine::draw(N5110 &lcd)
{
    // player
    _p.draw(lcd);

}

void Engine::update(Gamepad &pad)
{

    _p.update(_d,_mag);
    //wallCollide(pad);
    //enemmyCollide(pad);
}

/*
void Engine::wallCollision(Gamepad &pad)
{
}

void PongEngine::check_paddle_collisions(Gamepad &pad)
{
}

void PongEngine::print_health(N5110 &lcd)
{
}

*/