(mriceblock (x 439) (y 159) (stay-on-platform #t))
(mriceblock (x 479) (y 159) (stay-on-platform #f))
(trampoline (x 250) (y 150) (power 7.5))
+ (dispenser (x 700) (y 100) (badguy "random") (cycle 2))
)
)
}
//TODO: Add launching velocity to certain badguys
-// Add randomizer (themed to match tileset)
+// Add themed randomizer
+// Fix initial direction (everyone but MrRocket walks the wrong direction)
void
Dispenser::launch_badguy()
{
else if (badguy == "mrrocket")
Sector::current()->add_object(new MrRocket(get_pos().x, get_pos().y+32, dir));
else if (badguy == "random")
- {}
+ {
+ switch (rand()%5)
+ {
+ case 0: Sector::current()->add_object(new SnowBall(get_pos().x, get_pos().y+32, dir)); break;
+ case 1: Sector::current()->add_object(new BouncingSnowball(get_pos().x, get_pos().y+32, dir)); break;
+ case 2: Sector::current()->add_object(new MrBomb(get_pos().x, get_pos().y+32, dir)); break;
+ case 3: Sector::current()->add_object(new MrIceBlock(get_pos().x, get_pos().y+32, dir)); break;
+ case 4: Sector::current()->add_object(new MrRocket(get_pos().x, get_pos().y+32, dir)); break;
+ }
+ }
}
}