old_base = base;
dir = LEFT;
seen = false;
+ frozen_timer.init(true);
animation_offset = 0;
sprite_left = sprite_right = 0;
physic.reset();
if(!seen)
return;
+ if(frozen_timer.check())
+ return;
+
switch (kind)
{
case BAD_MRICEBLOCK:
sprite->draw(base.x, base.y);
if (debug_mode)
- fillrect(base.x, base.y, base.width, base.height, 75,0,75, 150);
+ fillrect(base.x - scroll_x, base.y - scroll_y, base.width, base.height, 75,0,75, 150);
}
void
BadGuy::collision(void *p_c_object, int c_object, CollisionType type)
{
BadGuy* pbad_c = NULL;
+ Bullet* pbullet_c = NULL;
if(type == COLLISION_BUMP) {
bump();
switch (c_object)
{
case CO_BULLET:
- kill_me(10);
+ pbullet_c = (Bullet*) p_c_object;
+
+ if(pbullet_c->kind == FIRE_BULLET)
+ kill_me(10);
+ else if(pbullet_c->kind == ICE_BULLET)
+ frozen_timer.start(FROZEN_TIME);
break;
case CO_BADGUY: