// $Id$
//
// DartTrap - Shoots a Dart at regular intervals
-// Copyright (C) 2006 Christoph Sommer <supertux@2006.expires.deltadevelopment.de>
+// Copyright (C) 2006 Christoph Sommer <christoph.sommer@2006.expires.deltadevelopment.de>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
public:
DartTrap(const lisp::Lisp& reader);
+ void initialize();
void activate();
void write(lisp::Writer& writer);
void active_update(float elapsed_time);
HitResponse collision_player(Player& player, const CollisionHit& hit);
+ virtual DartTrap* clone() const { return new DartTrap(*this); }
+
protected:
enum State {
IDLE, LOADING
void load(); /**< load a shot */
void fire(); /**< fire a shot */
-
- bool set_direction;
- Direction initial_direction;
+
float initial_delay; /**< time to wait before firing first shot */
float fire_delay; /**< reload time */
int ammo; /**< ammo left (-1 means unlimited) */
};
#endif
-