#include <snowball.hpp>
Inherits WalkingBadguy.
Public Member Functions | |
SnowBall (const Reader &reader) | |
SnowBall (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 22 of file snowball.hpp.
SnowBall::SnowBall | ( | const Reader & | reader | ) |
Definition at line 22 of file snowball.cpp.
References WalkingBadguy::walk_speed.
00023 : WalkingBadguy(reader, "images/creatures/snowball/snowball.sprite", "left", "right") 00024 { 00025 walk_speed = 80; 00026 }
Definition at line 28 of file snowball.cpp.
References WalkingBadguy::walk_speed.
00029 : WalkingBadguy(pos, d, "images/creatures/snowball/snowball.sprite", "left", "right") 00030 { 00031 walk_speed = 80; 00032 }
bool SnowBall::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 35 of file snowball.cpp.
References BadGuy::dir, BadGuy::kill_squished(), LEFT, and MovingSprite::sprite.
00036 { 00037 sprite->set_action(dir == LEFT ? "squished-left" : "squished-right"); 00038 kill_squished(object); 00039 return true; 00040 }