-Spiky::activate()
-{
- physic.set_velocity_x(dir == LEFT ? -WALKSPEED : WALKSPEED);
- sprite->set_action(dir == LEFT ? "left" : "right");
-}
-
-void
-Spiky::active_update(float )
-{
- if (stay_on_platform && may_fall_off_platform())
- {
- dir = (dir == LEFT ? RIGHT : LEFT);
- sprite->set_action(dir == LEFT ? "left" : "right");
- physic.set_velocity_x(-physic.get_velocity_x());
- }
-}
-
-HitResponse
-Spiky::collision_solid(GameObject& , const CollisionHit& hit)