src/Projectile.hh
author nireco
Fri, 05 Dec 2008 11:11:38 +0000
changeset 211 d5d52fb191e4
parent 208 7709571e1131
child 222 293ddf4c067d
permissions -rw-r--r--
some minor fixes, shots now explode in collisionpoint
#ifndef PROJECTILE_HH
#define PROJECTILE_HH
 
class Projectile;

#include "PhysicsObject.hh"
#include "GameState.hh"
#include "Timer.hh"

class Projectile : public PhysicsObject {
protected:
    GameState &state;
    bool visible;
    bool target_visible;
    bool destroyed;
    float radius;
public:

    TickCount birth_tick;
    TickCount age;

    Projectile(GameState &state, Vector position, Vector velocity, bool visible, float radius, TickCount age=1000000000);
    ~Projectile() {};

    bool isDestroyed (void) const;
    virtual void draw(CL_GraphicContext *gc) const;
private:
    virtual void onCollision();
};
 
#endif