start using CL_ResourceManager, change most draw methods to take a Graphics*, implment even better input handling, and draw weapon names
#ifndef PROJECTILE_HH
#define PROJECTILE_HH
class Projectile;
#include "GameState.hh"
#include "PhysicsObject.hh"
#include "Timer.hh"
#include "GraphicsPointer.hh"
class Projectile : public PhysicsObject {
protected:
GameState &state;
bool visible;
bool target_visible;
float radius;
public:
TickCount birth_tick;
TickCount age;
Projectile (GameState &state, Vector position, Vector velocity, bool visible, float radius, TickCount age=1000000000);
virtual ~Projectile (void);
virtual void draw (Graphics *g) const;
protected:
/*
* Removes ground at given position if applicable, and destroys this PhysicsObject.
*
* This is overriden by Network.
*/
virtual void onDestroy (Vector position, bool removeGround);
/*
* Call onDestroy, removingGround
*/
virtual void onCollision (void);
/*
* If we have expired, call onDestory without removingGround
*/
virtual void tick (TimeMS dt);
};
#endif