I've not tested it very well, but it doesn't seem to be working. Can anyone have a look?
SVN-Revision: 751
old_base = base;
mode=KICK;
+ tux.kick_timer.start(KICKING_TIME);
set_sprite(img_laptop_flat_left, img_laptop_flat_right);
physic.set_velocity_x((dir == LEFT) ? -3.5 : 3.5);
play_sound(sounds[SND_KICK],SOUND_CENTER_SPEAKER);
#define LEVEL_WIDTH 375
+/* Timing constants (in ms): */
+
+#define KICKING_TIME 3000
+
/* Debugging */
skidding_timer.init(true);
safe_timer.init(true);
frame_timer.init(true);
+ kick_timer.init(true);
physic.reset();
}
skidding_timer.check();
invincible_timer.check();
safe_timer.check();
+ kick_timer.check();
}
bool
else
sprite->skid_left->draw(base.x - scroll_x, base.y);
}
+ else if (kick_timer.started())
+ {
+ if (dir == RIGHT)
+ sprite->kick_right->draw(base.x - scroll_x, base.y);
+ else
+ sprite->kick_left->draw(base.x - scroll_x, base.y);
+ }
else if (physic.get_velocity_y() != 0)
{
if (dir == RIGHT)
Timer skidding_timer;
Timer safe_timer;
Timer frame_timer;
+ Timer kick_timer;
Physic physic;
public: