Rope can be drawn.
#ifndef ROPE_HH
#define ROPE_HH
// Pre-declarations since rope wants to know the Player
// and the Player wants to know the rope.
class Rope;
#include "Player.hh"
#include "PhysicsObject.hh"
enum RopeState { FOLDED, FLYING, FIXED };
class Rope : public PhysicsObject {
private:
Player &pl;
// How long is the rope in its static state
float length;
virtual void onCollision (void);
RopeState rs;
public:
Rope(Player &climber);
void shoot (void);
void release (void);
RopeState getState (void);
virtual void draw(CL_GraphicContext *gc) const;
};
#endif