test 1 doc

Dependencies:   mbed Gamepad2

Platform/Platform.cpp

Committer:
joebarhouch
Date:
2020-05-22
Revision:
5:928c2eee4109
Child:
6:00d20886e4f8

File content as of revision 5:928c2eee4109:

#include "Platform.h"

Platform::Platform()
{

}

Platform::~Platform()
{

}

//init
void Platform::init()
{
    x = 0;
    y = 15;
    width = 30;
    height = 3;
}

void Platform::draw(N5110 &lcd)
{
    lcd.drawRect(x, y, width, height, FILL_TRANSPARENT);
    _x = x;
    _y = y;
    _width = width;
    _height = height;
    
    
    //debug prints
    printf("x: %i, y: %i, width: %i, height %i \n", x, y, width, height);
}

Vector3 Platform::get_plats()
{
    Vector3 pos = {_x, _y, _width, _height};
    return pos;
}