#define HEADER_SUPERTUX_OBJECT_COIN_HPP
#include "object/moving_sprite.hpp"
+#include "supertux/physic.hpp"
+
+class Path;
+class PathWalker;
+class TileMap;
class Coin : public MovingSprite
{
public:
Coin(const Vector& pos);
+ Coin(const Vector& pos, TileMap* tilemap);
Coin(const Reader& reader);
HitResponse collision(GameObject& other, const CollisionHit& hit);
void collect();
+ virtual void update(float elapsed_time);
+
+private:
+ boost::shared_ptr<Path> path;
+ boost::shared_ptr<PathWalker> walker;
+ Vector offset;
+ bool from_tilemap;
+ Physic physic;
+};
+
+class HeavyCoin : public Coin
+{
+public:
+ HeavyCoin(const Vector& pos, const Vector& init_velocity);
+ HeavyCoin(const Reader& reader);
+
+ virtual void update(float elapsed_time);
+ virtual void collision_solid(const CollisionHit& hit);
+
+private:
+ Physic physic;
};
#endif