Hugo Hu / Mbed 2 deprecated BRAVEHEART

Dependencies:   mbed N5110 ShiftReg PinDetect

Entity.h

Committer:
Siriagus
Date:
2015-05-03
Revision:
9:da608ae65df9
Child:
11:adb68da98262

File content as of revision 9:da608ae65df9:

#ifndef ENTITY_H
#define ENTITY_H

class Entity
{
    public:
        Entity() {x = y = width = height = vx = vy = 0; goingLeft = true;}
        Entity(int x, int y, int w, int h) : x(x), y(y), width(w), height(h) {vx = vy = 0; goingLeft = true;}
        
        int x, y;
        int vx, vy;     // Velocity x and y
        int width;
        int height;
        
        bool goingLeft; // Direction of entity can be left or right
};

#endif