Initial publish

Dependencies:   mbed

Fork of el17dg by Dmitrijs Griskovs

game/gameobject.h

Committer:
Noximilien
Date:
2019-04-23
Revision:
31:becb8f6bf7b7
Parent:
29:579e00b7f118
Child:
33:c623c6d5ed16

File content as of revision 31:becb8f6bf7b7:

#ifndef GAMEOBJECT_H
#define GAMEOBJECT_H

#include "geometry.h"

/////////////////////////////////////////////////////////////////////
/** 
 * GameObject Class
 * @brief Base class for all objects in the game world.
 * @author Dmitrijs Griskovs
 * @date 15/04/2019
 */
class GameObject {
public:
/** 
 * @brief Activates the object at the given postion.
 * @param spawn_pos sets position of x and y into pos (Point).
 */
    void spawn(Point spawn_pos) {
        pos = spawn_pos;
        active = true;
    }
    Point pos;
    bool active;
};
#endif