projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rolled back bomb to old behaviour, some bomb gfx tuning
[supertux.git]
/
src
/
badguy
/
zeekling.hpp
diff --git
a/src/badguy/zeekling.hpp
b/src/badguy/zeekling.hpp
index
1fee377
..
3979dd1
100644
(file)
--- a/
src/badguy/zeekling.hpp
+++ b/
src/badguy/zeekling.hpp
@@
-2,7
+2,7
@@
//
// Zeekling - flyer that swoops down when she spots the player
// Copyright (C) 2005 Matthias Braun <matze@braunis.de>
//
// 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
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@
-28,17
+28,17
@@
class Zeekling : public BadGuy
{
public:
Zeekling(const lisp::Lisp& reader);
{
public:
Zeekling(const lisp::Lisp& reader);
- Zeekling(
float pos_x, float pos_y
, Direction d);
+ Zeekling(
const Vector& pos
, Direction d);
- void
activat
e();
+ void
initializ
e();
void write(lisp::Writer& writer);
void write(lisp::Writer& writer);
-
HitResponse collision_solid(GameObject& other,
const CollisionHit& hit);
+
void collision_solid(
const CollisionHit& hit);
void active_update(float elapsed_time);
void active_update(float elapsed_time);
+ virtual Zeekling* clone() const { return new Zeekling(*this); }
+
protected:
protected:
- bool collision_squished(Player& player);
- bool set_direction;
- Direction initial_direction;
+ bool collision_squished(GameObject& object);
float speed;
Timer diveRecoverTimer;
float speed;
Timer diveRecoverTimer;
@@
-51,11
+51,13
@@
protected:
ZeeklingState state;
private:
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();
bool should_we_dive();
void onBumpHorizontal();
void onBumpVertical();
-
};
#endif
};
#endif
-