-void
-SnowBall::collision_solid(const CollisionHit& hit)
-{
- if(hit.top || hit.bottom) {
- physic.set_velocity_y(0);
- }
- if(hit.left || hit.right) {
- dir = dir == LEFT ? RIGHT : LEFT;
- sprite->set_action(dir == LEFT ? "left" : "right");
- physic.set_velocity_x(-physic.get_velocity_x());
- }
-}
-
-HitResponse
-SnowBall::collision_badguy(BadGuy& , const CollisionHit& hit)
-{
- if(hit.top || hit.bottom) {
- physic.set_velocity_y(0);
- }
- if(hit.left || hit.right) {
- dir = dir == LEFT ? RIGHT : LEFT;
- sprite->set_action(dir == LEFT ? "left" : "right");
- physic.set_velocity_x(-physic.get_velocity_x());
- }
-
- return CONTINUE;
-}
-