blob: 2e77e5e9ddc44312d847ece873b8cfd0393a4e6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 */
|