X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fbadguy%2Fdart.hpp;h=1c6a3d33d40efb2ba930dfc114729b5da8912965;hb=0222881aae90660c925ea2733cd8c80be7ac837b;hp=c816e9271f514aae1b17ab49afcdf3dfdc032f0b;hpb=cb941f239a04ee0588c99bfcdcd6aff62e1fbc98;p=supertux.git diff --git a/src/badguy/dart.hpp b/src/badguy/dart.hpp index c816e9271..1c6a3d33d 100644 --- a/src/badguy/dart.hpp +++ b/src/badguy/dart.hpp @@ -30,7 +30,8 @@ class Dart : public BadGuy { public: Dart(const lisp::Lisp& reader); - Dart(float pos_x, float pos_y, Direction d, const BadGuy* parent); + Dart(const Vector& pos, Direction d, const BadGuy* parent); + Dart(const Dart& dart); ~Dart(); void activate(); @@ -43,11 +44,15 @@ public: HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); HitResponse collision_player(Player& player, const CollisionHit& hit); + virtual Dart* clone() const { return new Dart(*this); } + + virtual bool updatePointers(const GameObject* from_object, GameObject* to_object); + protected: bool set_direction; Direction initial_direction; const BadGuy* parent; /**< collisions with this BadGuy will be ignored */ - SoundSource* soundSource; /**< SoundSource for ambient sound */ + std::auto_ptr sound_source; /**< SoundSource for ambient sound */ }; #endif