#include <smartball.hpp>
Inherits WalkingBadguy.
Public Member Functions | |
SmartBall (const Reader &reader) | |
SmartBall (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 smartball.hpp.
SmartBall::SmartBall | ( | const Reader & | reader | ) |
Definition at line 22 of file smartball.cpp.
References WalkingBadguy::max_drop_height, and WalkingBadguy::walk_speed.
00023 : WalkingBadguy(reader, "images/creatures/snowball/smart-snowball.sprite", "left", "right") 00024 { 00025 walk_speed = 80; 00026 max_drop_height = 16; 00027 }
Definition at line 29 of file smartball.cpp.
References WalkingBadguy::max_drop_height, and WalkingBadguy::walk_speed.
00030 : WalkingBadguy(pos, d, "images/creatures/snowball/smart-snowball.sprite", "left", "right") 00031 { 00032 walk_speed = 80; 00033 max_drop_height = 16; 00034 }
bool SmartBall::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 smartball.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 }