topical media & game development
mobile-graphic-enchant-examples-beginner-map-main.js / js
enchant();
window.onload = function() {
var game = new Game(320, 320);
game.fps = 20;
game.preload('mobile-graphic-enchant-examples-beginner-map-chara1.png', 'mobile-graphic-enchant-examples-beginner-map-map0.png');
game.onload = function() {
var map = new Map(16, 16);
map.image = game.assets['mobile-graphic-enchant-examples-beginner-map-map0.png'];
map.loadData(
[
[4, 4, 4, 4, 4, 4, 4],
[4, 5, 5, 5, 5, 5, 4],
[4, 5, 4, 5, 4, 5, 4],
[4, 5, 5, 5, 5, 5, 4],
[4, 5, 4, 5, 4, 5, 4],
[4, 5, 5, 5, 5, 5, 4],
[4, 4, 4, 4, 4, 4, 4]
]
);
game.rootScene.addChild(map);
};
game.start();
};
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.