diff options
author | Simponic <loganthebean222@gmail.com> | 2020-06-30 20:10:29 -0600 |
---|---|---|
committer | Simponic <loganthebean222@gmail.com> | 2020-06-30 20:10:29 -0600 |
commit | 3010473314505bd948c687ac644b7d87ef03298d (patch) | |
tree | e7099f6c431305cdd041d32ba244eb6360eec2f9 /src/flyingObject.h | |
parent | 7a60ab9f178dd813c876fcf8e25c947f9a9a5e06 (diff) | |
download | asteroids-cs165-3010473314505bd948c687ac644b7d87ef03298d.tar.gz asteroids-cs165-3010473314505bd948c687ac644b7d87ef03298d.zip |
Updated file structure and changed indents to spaces
Diffstat (limited to 'src/flyingObject.h')
-rw-r--r-- | src/flyingObject.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/flyingObject.h b/src/flyingObject.h new file mode 100644 index 0000000..2e77e5e --- /dev/null +++ b/src/flyingObject.h @@ -0,0 +1,28 @@ +#ifndef flyingObject_h +#define flyingObject_h + +#include "point.h" +#include "velocity.h" +#include "uiDraw.h" + +class FlyingObject +{ +protected: + Point point; + Velocity velocity + bool alive; +public: + FlyingObject() : point( Point() ) , velocity( Velocity() ) , alive( true ) {} + Point getPoint() const { return this->point; } + void setPoint( const Point &point ) { this->point = point; } + Velocity getVelocity() const { return this->velocity; } + void setVelocity( const Velocity &velocity) { this->velocity = velocity; } + bool isAlive() { return this->alive; } + void kill() { alive = false; }; + virtual void draw() { drawDot( point ); }; + virtual void advance(); +}; + + + +#endif /* flyingObject_h */ |