/* Base class for different type of vehicles they are supposed to move and be drawn you should be able to select them by clicking they can also be hit and have a key */ #ifndef _projectile_hh_ #define _projectile_hh_ class Projectile { //pure virtual public: bool live; virtual void draw() = 0; virtual void key() = 0; virtual void action() = 0; bool alive(); virtual void hit() { } virtual void collide() { } virtual bool tryCollision() { return false; } // virtual vector getPoints() = 0; virtual ~Projectile() { } }; class ProjectileEraser { public: bool operator() ( Projectile * p ) { p->draw(); if ( !p->alive() ) { //particles thinks it has done it's work clean up delete p; return true; } return false; } }; #endif