#include <walkingleaf.hpp>
Inherits WalkingBadguy.
Public Member Functions | |
WalkingLeaf (const Reader &reader) | |
WalkingLeaf (const Vector &pos, Direction d) | |
Protected Member Functions | |
bool | collision_squished (GameObject &object) |
Called when the player hit the badguy from above. |
Definition at line 25 of file walkingleaf.hpp.
WalkingLeaf::WalkingLeaf | ( | const Reader & | reader | ) |
Definition at line 22 of file walkingleaf.cpp.
References WalkingBadguy::max_drop_height, and WalkingBadguy::walk_speed.
00022 : 00023 WalkingBadguy(reader, "images/creatures/walkingleaf/walkingleaf.sprite", "left", "right") 00024 { 00025 walk_speed = 60; 00026 max_drop_height = 16; 00027 }
Definition at line 29 of file walkingleaf.cpp.
References WalkingBadguy::max_drop_height, and WalkingBadguy::walk_speed.
00030 : WalkingBadguy(pos, d, "images/creatures/walkingleaf/walkingleaf.sprite", "left", "right") 00031 { 00032 walk_speed = 60; 00033 max_drop_height = 16; 00034 }
bool WalkingLeaf::collision_squished | ( | GameObject & | object | ) | [protected, virtual] |
Called when the player hit the badguy from above.
You should return true if the badguy was squished, false if squishing wasn't possible
Reimplemented from BadGuy.
Definition at line 37 of file walkingleaf.cpp.
References BadGuy::dir, BadGuy::kill_squished(), LEFT, and MovingSprite::sprite.
00038 { 00039 sprite->set_action(dir == LEFT ? "squished-left" : "squished-right"); 00040 kill_squished(object); 00041 return true; 00042 }