//
// Zeekling - flyer that swoops down when she spots the player
// Copyright (C) 2005 Matthias Braun <matze@braunis.de>
-// 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
Zeekling(const lisp::Lisp& reader);
Zeekling(const Vector& pos, Direction d);
- void activate();
+ void initialize();
void write(lisp::Writer& writer);
void collision_solid(const CollisionHit& hit);
void active_update(float elapsed_time);
virtual Zeekling* clone() const { return new Zeekling(*this); }
protected:
- bool collision_squished(Player& player);
+ bool collision_squished(GameObject& object);
float speed;
Timer diveRecoverTimer;
ZeeklingState state;
private:
+ const MovingObject* last_player; /**< last player we tracked */
+ Vector last_player_pos; /**< position we last spotted the player at */
+ Vector last_self_pos; /**< position we last were at */
+
bool should_we_dive();
void onBumpHorizontal();
void onBumpVertical();
};
#endif
-