test 1 doc

Dependencies:   mbed Gamepad2

Committer:
joebarhouch
Date:
Tue May 26 01:45:20 2020 +0000
Revision:
7:530ca713d2b2
Parent:
6:00d20886e4f8
Fully functional game physics with floor collision and jumps

Who changed what in which revision?

UserRevisionLine numberNew contents of line
joebarhouch 5:928c2eee4109 1 #include "Platform.h"
joebarhouch 5:928c2eee4109 2
joebarhouch 6:00d20886e4f8 3 Platform::Platform(int x, int y, int w, int h)
joebarhouch 5:928c2eee4109 4 {
joebarhouch 6:00d20886e4f8 5 _x = x;
joebarhouch 6:00d20886e4f8 6 _y = y;
joebarhouch 6:00d20886e4f8 7 _width = w;
joebarhouch 6:00d20886e4f8 8 _height = h;
joebarhouch 5:928c2eee4109 9 }
joebarhouch 5:928c2eee4109 10
joebarhouch 5:928c2eee4109 11 Platform::~Platform()
joebarhouch 5:928c2eee4109 12 {
joebarhouch 5:928c2eee4109 13
joebarhouch 5:928c2eee4109 14 }
joebarhouch 5:928c2eee4109 15
joebarhouch 6:00d20886e4f8 16
joebarhouch 6:00d20886e4f8 17 ////////////////////// DRAW //////////////////////////
joebarhouch 7:530ca713d2b2 18 void Platform::draw(N5110 &lcd)
joebarhouch 5:928c2eee4109 19 {
joebarhouch 6:00d20886e4f8 20 lcd.drawRect(_x, _y, _width, _height, FILL_TRANSPARENT);
joebarhouch 6:00d20886e4f8 21 //debug prints
joebarhouch 6:00d20886e4f8 22 //printf("x: %i, y: %i, width: %i, height %i \n", x, y, width, height);
joebarhouch 6:00d20886e4f8 23 }
joebarhouch 6:00d20886e4f8 24
joebarhouch 6:00d20886e4f8 25 ////////////////////// POSTITIONS //////////////////////////
joebarhouch 6:00d20886e4f8 26 Vector4 Platform::get_pos()
joebarhouch 6:00d20886e4f8 27 {
joebarhouch 6:00d20886e4f8 28 Vector4 pos = {_x, _y, _width, _height};
joebarhouch 6:00d20886e4f8 29 return pos;
joebarhouch 5:928c2eee4109 30 }
joebarhouch 5:928c2eee4109 31
joebarhouch 6:00d20886e4f8 32
joebarhouch 6:00d20886e4f8 33
joebarhouch 6:00d20886e4f8 34