#include "scene.h"
#include "globals.h"
#include "player.h"
+#include "resources.h"
texture_type img_bullet;
texture_type img_golden_herring;
}
void
-Bullet::action()
+Bullet::action(double frame_ratio)
{
base.x = base.x + base.xm * frame_ratio;
base.y = base.y + base.ym * frame_ratio;
}
void
-Upgrade::action()
+Upgrade::action(double frame_ratio)
{
if (base.height < 32)
{
pplayer->base.y += 32;
pplayer->duck = true;
}
- timer_start(&super_bkgd_timer, 350);
}
else if (kind == UPGRADE_COFFEE)
{
play_sound(sounds[SND_COFFEE], SOUND_CENTER_SPEAKER);
pplayer->got_coffee = true;
- timer_start(&super_bkgd_timer, 250);
}
else if (kind == UPGRADE_HERRING)
{
play_sound(sounds[SND_HERRING], SOUND_CENTER_SPEAKER);
- timer_start(&pplayer->invincible_timer,TUX_INVINCIBLE_TIME);
- timer_start(&super_bkgd_timer, 250);
+ pplayer->invincible_timer.start(TUX_INVINCIBLE_TIME);
/* play the herring song ^^ */
if (get_current_music() != HURRYUP_MUSIC)
{