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

Dependencies:   mbed

GameObject/GameObject.h

Committer:
el15as
Date:
2017-04-30
Revision:
5:158e2951654b
Parent:
4:1f7f32f3e017
Child:
6:33fd1797beb4

File content as of revision 5:158e2951654b:

#ifndef GAMEOBJECT_H
#define GAMEOBJECT_H

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

#define OBJECTCOUNT 41

class GameObject
{

public:

    GameObject();
    ~GameObject();

    int type; // 0 - Platform, 1 - Horizontal Spikes, 2 - Vertical Spikes, 3 - Door, 4 - Switch
    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