From d8b164e4727c887979d4da6a4011a444749862fc Mon Sep 17 00:00:00 2001 From: Simponic Date: Thu, 13 Aug 2020 12:07:52 -0600 Subject: Better file structure, stuff is better in general --- include/flyingObject.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 include/flyingObject.h (limited to 'include/flyingObject.h') diff --git a/include/flyingObject.h b/include/flyingObject.h new file mode 100644 index 0000000..3296c5a --- /dev/null +++ b/include/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 */ -- cgit v1.2.3-70-g09d2