SnowBall Class Reference

#include <snowball.hpp>

Inherits WalkingBadguy.

List of all members.

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.


Detailed Description

Definition at line 22 of file snowball.hpp.


Constructor & Destructor Documentation

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 }

SnowBall::SnowBall ( const Vector pos,
Direction  d 
)

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 }


Member Function Documentation

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 }


The documentation for this class was generated from the following files:
Generated on Mon Jun 9 03:38:36 2014 for SuperTux by  doxygen 1.5.1