Adventures in
JavaScript
055 : Monsters
Balthazar:
To add monsters:
function create_platform(x, y, width, height) {
...
}
function create_monster(x, y, width, height) {
var m = {};
m.x = x;
m.y = y;
m.width = width;
m.height = height;
m.origin_x = m.width / 2;
m.origin_y = m.height;
return m;
}
function create_goal(x, y) {
...
}
GOTO 064
if you already have the
Platform II - Four Sided
badge.
GOTO 063