ELEC2645 (2016/17) / Mbed 2 deprecated 2645_Project_el15as

Dependencies:   mbed

GameObject/GameObject.h

Committer:
el15as
Date:
2017-05-01
Revision:
6:33fd1797beb4
Parent:
5:158e2951654b
Child:
8:c3cf8d1057bb

File content as of revision 6:33fd1797beb4:

#ifndef GAMEOBJECT_H
#define GAMEOBJECT_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"

#define OBJECTCOUNT 51

class GameObject
{

public:

    GameObject();
    ~GameObject();

    int type; // 0 - Platform, 1 - Horizontal Spikes, 2 - Vertical Spikes, 3 - Door, 4 - Switch, 5 - Uncollected Coin, 6 - Collected Coin
    intVector2D position; // Top-left corner of the cube
    int width;
    int height;

    bool containsPoint(int x, int y);

private:

    bool containsX(int _x);
    bool containsY(int _y);

};
#endif