Owl::Owl(const Reader& reader) :
BadGuy(reader, "images/creatures/owl/owl.sprite", LAYER_OBJECTS + 1),
- carried_obj_name("bombfish"),
+ carried_obj_name("skydive"),
carried_object(NULL)
{
reader.get("carry", carried_obj_name);
Owl::Owl(const Vector& pos, Direction d) :
BadGuy(pos, d, "images/creatures/owl/owl.sprite", LAYER_OBJECTS + 1),
- carried_obj_name("bombfish"),
+ carried_obj_name("skydive"),
carried_object(NULL)
{
set_action (dir == LEFT ? "left" : "right", /* loops = */ -1);
#include "object/player.hpp"
#include "object/explosion.hpp"
-BombFish::BombFish(const Reader& reader) :
+SkyDive::SkyDive(const Reader& reader) :
BadGuy(reader, "images/creatures/bombfish/bombfish.sprite"),
is_grabbed(false)
{
}
-BombFish::BombFish(const Vector& pos, Direction d) :
+SkyDive::SkyDive(const Vector& pos, Direction d) :
BadGuy(pos, d, "images/creatures/bombfish/bombfish.sprite"),
is_grabbed(false)
{
}
void
-BombFish::collision_solid(const CollisionHit& hit)
+SkyDive::collision_solid(const CollisionHit& hit)
{
if (hit.bottom) {
explode ();
} /* void collision_solid */
HitResponse
-BombFish::collision_badguy(BadGuy&, const CollisionHit& hit)
+SkyDive::collision_badguy(BadGuy&, const CollisionHit& hit)
{
if (hit.bottom) {
explode ();
} /* HitResponse collision_badguy */
void
-BombFish::grab (MovingObject&, const Vector& pos, Direction dir)
+SkyDive::grab (MovingObject&, const Vector& pos, Direction dir)
{
movement = pos - get_pos();
this->dir = dir;
}
void
-BombFish::ungrab (MovingObject& , Direction)
+SkyDive::ungrab (MovingObject& , Direction)
{
is_grabbed = false;
}
HitResponse
-BombFish::collision_player(Player&, const CollisionHit& hit)
+SkyDive::collision_player(Player&, const CollisionHit& hit)
{
if (hit.bottom) {
explode ();
} /* HitResponse collision_player */
bool
-BombFish::collision_squished (GameObject& obj)
+SkyDive::collision_squished (GameObject& obj)
{
Player *player = dynamic_cast<Player *> (&obj);
if (player) {
} /* bool collision_squished */
void
-BombFish::active_update (float elapsed_time)
+SkyDive::active_update (float elapsed_time)
{
if (!is_grabbed)
movement = physic.get_movement(elapsed_time);
} /* void active_update */
void
-BombFish::explode (void)
+SkyDive::explode (void)
{
if (!is_valid ())
return;
#include "badguy/badguy.hpp"
#include "object/portable.hpp"
-class BombFish : public BadGuy, public Portable
+class SkyDive : public BadGuy, public Portable
{
private:
bool is_grabbed;
public:
- BombFish(const Reader& reader);
- BombFish(const Vector& pos, Direction d);
+ SkyDive(const Reader& reader);
+ SkyDive(const Vector& pos, Direction d);
void collision_solid(const CollisionHit& hit);
HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit);
{
// badguys
add_factory<AngryStone>("angrystone");
- add_factory<BombFish>("bombfish");
add_factory<BouncingSnowball>("bouncingsnowball");
add_factory<CaptainSnowball>("captainsnowball");
add_factory<Crystallo>("crystallo");
add_factory<PoisonIvy>("poisonivy");
add_factory<ShortFuse>("short_fuse");
add_factory<SSpiky>("sspiky");
+ add_factory<SkyDive>("skydive");
add_factory<SkullyHop>("skullyhop");
add_factory<SmartBall>("smartball");
add_factory<Snail>("snail");