ϡenchant.jsϤȤɬפʡŪʥΤޤȤǤ
enchant.js°ΥץΥ(\examples\action)ȥ塼ƥ(\examples\shooting)ʤɤɤƤޤ
enchant.jsϡץ뤿Υ饤֥ץǤ(२Ȥ)
HTML5JavascriptȤѤǺƤơѥʤޡȥե䥿֥åȤˤбǤޤ
ǤϡĥɤʣˤƤäơޤ륲ޤ
⤦餷
enchant.js顢ΥեФޤ
(bear.gif)ϡɤƤޤ
¹Ԥˤϡ index.html֥륯å顢ᥤץǤgame.js䡢饤֥Ǥenchant.jsƤӽФƤޤ
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <title>Sample Game</title> <script type="text/javascript" src="enchant.js"></script> <script type="text/javascript" src="game.js"></script> <style type="text/css"> body { margin: 0; } </style> </head> <body> </body> </html>
ΥᥤץǤgame.jsδŪʹ֤ˤߤƤޤ
줬ܷե(bear.gif)ɤ߹Ǥ뤱ɽϤʤ
ΥƥȤgame.jsȤƥȥեȤ¸롣ơindex.htmlƤӽФȡץ¹ԡ
enchant(); window.onload = function() { var game = new Game(320, 320); //̤ game.preload('bear.gif'); //եɤ߹ game.onload = function() { //{פȡ}פδ֤ˡưҤ } game.start(); }
ҤΥեơץ饤ȵǽ(Sprite)Dzɽ롣
enchant(); window.onload = function() { var game = new Game(320, 320); game.preload('bear.gif'); game.onload = function() { var bear = new Sprite(20, 30); bear.image = game.assets['bear.gif']; game.rootScene.addChild(bear); } game.start(); }
ʣΥäƤξ硢ץ饤Ȥ̤Υɽ롣
ޤ⤤Ƥ륢˥ʤɤ˻Ȥޤ(ޤ⤭ޤ)
enchant(); window.onload = function() { var game = new Game(320, 320); game.preload('bear.gif'); game.onload = function() { var bear = new Sprite(20, 30); bear.image = game.assets['bear.gif']; bear.frame = 1; game.rootScene.addChild(bear); } game.start(); }
ץ饤Ȥΰ֤
enchant(); window.onload = function() { var game = new Game(320, 320); game.preload('bear.gif'); game.onload = function() { var bear = new Sprite(20, 30); bear.image = game.assets['bear.gif']; bear.x = 150; bear.y = 150; bear.frame = 1; game.rootScene.addChild(bear); } game.start(); }
ơڤؤ
enchant(); window.onload = function() { var game = new Game(320, 320); game.preload('bear.gif'); game.onload = function() { var bear = new Sprite(20, 30); bear.image = game.assets['bear.gif']; bear.addEventListener('enterframe', function() { bear.x = 150; bear.y = 150; if(game.input.left) bear.frame = 1; if(game.input.right) bear.frame = 2; }); game.rootScene.addChild(bear); } game.start(); }
ǡξ
enchant(); window.onload = function() { var game = new Game(320, 320); game.preload('bear.gif'); game.onload = function() { var bear = new Sprite(20, 30); bear.image = game.assets['bear.gif']; bear.addEventListener('enterframe', function() { bear.x = 150; bear.y = 150; if(game.input.right) { if(bear.frame == 1) { bear.frame = 2; } else { bear.frame = 1; } } if(game.input.left) { if(bear.frame == 4) { bear.frame = 5; } else { bear.frame = 4; } } }); game.rootScene.addChild(bear); } game.start(); }
롣ɤ̵롣
enchant(); window.onload = function() { var game = new Game(320, 320); game.preload('bear.gif'); game.onload = function() { var bear = new Sprite(20, 30); bear.image = game.assets['bear.gif']; bear.addEventListener('enterframe', function() { bear.y = 150; if(game.input.right) { if(bear.frame == 1) { bear.frame = 2; } else { bear.frame = 1; } bear.x += 5; } if(game.input.left) { if(bear.frame == 4) { bear.frame = 5; } else { bear.frame = 4; } bear.x -= 5; } }); game.rootScene.addChild(bear); } game.start(); }
롣ɤǻߤޤ롣
enchant(); window.onload = function() { var game = new Game(320, 320); game.preload('bear.gif'); game.onload = function() { var bear = new Sprite(20, 30); bear.image = game.assets['bear.gif']; bear.addEventListener('enterframe', function() { bear.y = 150; if(game.input.right) { if(bear.frame == 1) { bear.frame = 2; } else { bear.frame = 1; } if (bear.x < 300) { bear.x += 5; } else { bear.x = 300; } } if(game.input.left) { if(bear.frame == 4) { bear.frame = 5; } else { bear.frame = 4; } if (bear.x > 0) { bear.x -= 5; } else { bear.x = 0; } } }); game.rootScene.addChild(bear); } game.start(); }
ޤǤǴե
̾ʸɽˤϡ٥뵡ǽ(Label)Ȥޤ
Running Bear:פȤʸɽ
enchant(); window.onload = function() { var game = new Game(320, 320); var label = new Label("Running Bear:"); label.x = 0; label.y = 0; game.rootScene.addChild(label); game.start(); }
ǤϤʤɽƤʸѲ
enchant(); window.onload = function() { var game = new Game(320, 320); game.preload("bear.gif"); var label = new Label("Running Bear:"); label.x = 0; label.y = 0; game.rootScene.addChild(label); game.onload = function() { var label_time = new Label(); label_time.x = 0; label_time.y = 14; label_time.addEventListener('enterframe', function() { label_time.text = game.frame; }); game.rootScene.addChild(label_time); } game.start(); }
ޤꡢв֤ɽޤ
˥Υԡɤgame.fps = 15;פĴƤޤ
enchant(); window.onload = function() { var game = new Game(320, 320); game.preload("bear.gif"); game.fps = 15; var label = new Label("Running Bear:"); label.x = 0; label.y = 0; game.rootScene.addChild(label); game.onload = function() { //٥ʸɽ var label_time = new Label(); label_time.x = 0; label_time.y = 14; label_time.addEventListener('enterframe', function() { label_time.text = game.frame; }); game.rootScene.addChild(label_time); //ץ饤Ȥǥɽ var bear = new Sprite(20, 30); bear.image = game.assets['bear.gif']; bear.addEventListener('enterframe', function() { if(bear.frame == 1) { bear.frame = 2; } else { bear.frame = 1; } bear.x += 5 if (bear.x > 300) { bear.x = 0; } bear.y = 50; }); game.rootScene.addChild(bear); } game.start(); }
ޤǤǴե
˸̲ĤȡڤǤ
ɥե()ɤ߹ǡ.playפǺޤ
enchant(); window.onload = function() { var game = new Game(320, 320); game.preload('jump.wav'); game.onload = function() { var sound = game.assets['jump.wav'].play(); sound.play(); }; game.start(); };
ɽΤȤˡȤ߹ߤޤ
̲եɤ߹ʤơ٤ϫޤenchant.jsΥСŤȤޤʤޤ
enchant(); window.onload = function() { var game = new Game(320, 320); game.preload('jump.wav', 'bear.gif'); game.onload = function() { game.assets['jump.wav'].play(); var bear = new Sprite(20, 30); bear.image = game.assets['bear.gif']; bear.addEventListener('enterframe', function() { if(game.input.right) { var sound = game.assets['jump.wav'].clone(); sound.play(); } }); game.rootScene.addChild(bear); }; game.start(); };
ޤǤǴե
ץϡĤʤȤ߹碌Ȥƺȡ䤹ʤޤ
KumaȤ(֥)player1player2˳ƤƤޤ ҤȤĤ߷(Kuma)顢ʣʤФƤޤʤϡƬʸʸˤޤϡʸǽƤޤ
enchant(); var Kuma = enchant.Class.create(enchant.Sprite, { initialize: function(x, y){ enchant.Sprite.call(this, 20, 30); this.image = game.assets['bear.gif']; this.x = x; this.y = y; this.frame = 0; game.rootScene.addChild(this); } }); window.onload = function() { game = new Game(320, 320); game.preload('bear.gif'); game.onload = function() { player1 = new Kuma(0, 0); player1.frame = 1; player2 = new Kuma(30, 0); player2.frame = 2; } game.start(); }
ʤǤϡʤ߷¦ưǤޤǤϡKumaʤˡmove_rightmove_leftƤޤơᥤʬǡ줿˹碌ơmove_rightmove_leftƤӽФƤޤ
enchant(); var Kuma = enchant.Class.create(enchant.Sprite, { initialize: function(x, y){ enchant.Sprite.call(this, 20, 30); this.image = game.assets['bear.gif']; this.x = x; this.y = y; this.frame = 0; game.rootScene.addChild(this); }, move_right: function() { this.x += 5; }, move_left: function() { this.x -= 5; } }); window.onload = function() { game = new Game(320, 320); game.preload('bear.gif'); game.onload = function() { player = new Kuma(0, 0); game.addEventListener('enterframe', function() { if(game.input.right) { player.move_right(); } if(game.input.left) { player.move_left(); } }); } game.start(); }
äĤƤߤϤθФϡ¦˰ưǡ¦Ϥäꡣ ϺĤǤ롣
enchant(); SCREEN_WIDTH = 320; SCREEN_HEIGHT = 320; var Kuma = enchant.Class.create(enchant.Sprite, { initialize: function(x, y){ this.KUMA_WIDTH = 20; this.KUMA_HEIGHT = 30; this.KUMA_Y = 50; this.dir = 0; //ʹ 0:(right)1:(left) this.walk = 0; //ԥݡ 0: 1: 2: this.step = 5; enchant.Sprite.call(this, this.KUMA_WIDTH, this.KUMA_HEIGHT); this.image = game.assets['bear.gif']; this.x = x; this.y = this.KUMA_Y; this.frame = 0; this.addEventListener('enterframe', function() { if(game.input.right) { this.move_right(); } else if(game.input.left) { this.move_left(); } else { this.move_stop(); } this.change_frame(); }); game.rootScene.addChild(this); }, move_right: function() { this.dir = 0; if((this.walk == 0) || (this.walk == 2)){ this.walk = 1; } else if(this.walk == 1) { this.walk = 2; } if (this.x < (SCREEN_WIDTH - this.KUMA_WIDTH)) { this.x += this.step; } else { this.x = SCREEN_WIDTH - this.KUMA_WIDTH; } }, move_left: function() { this.dir = 1; if((this.walk == 0) || (this.walk == 2)){ this.walk = 1; } else if(this.walk == 1) { this.walk = 2; } if (this.x > 0) { this.x -= this.step; } else { this.x = 0; } }, move_stop: function(){ if(this.walk !== 0) { game.assets['jump.wav'].play(); } this.walk = 0; }, change_frame: function() { this.frame = this.dir * 3 + this.walk; } }); window.onload = function() { game = new Game(SCREEN_WIDTH, SCREEN_HEIGHT); game.preload('jump.wav', 'bear.gif'); game.onload = function() { player = new Kuma(0, 0); } game.start(); }
ޤǤǴե
ǤϡʣŨ䥿åȤо줷ޤȤСФǤȤ١ȤäǤ¸뤿ˤϡ̤ΥѡĤʣо줵ơƱưɬפޤ
ޤʣβɽˡҤȤĤʲɽƤߤޤ礦ϡۤɤΥʲˡȤۤȤƱǡAppleȤʤ夫ߤäƤޤAppleϡ1ɽޤäƤΤϡβʤõǤ褦ˤƤȤ(remove)Ǥ
enchant(); SCREEN_WIDTH = 320; SCREEN_HEIGHT = 320; var Apple = enchant.Class.create(enchant.Sprite, { initialize: function(x, y){ this.WIDTH = 16; this.HEIGHT = 16; this.STEP = 5; enchant.Sprite.call(this, this.WIDTH, this.HEIGHT); this.image = game.assets['icon0.gif']; this.x = x; this.y = y; this.frame = 15; this.addEventListener('enterframe', function(){ this.move_step(); }); game.rootScene.addChild(this); }, move_step: function() { this.y += this.STEP; if (this.y >= (SCREEN_HEIGHT - this.HEIGHT)) { this.remove(); } }, remove: function(){ game.rootScene.removeChild(this); } }); window.onload = function() { game = new Game(SCREEN_WIDTH, SCREEN_HEIGHT); game.fps = 15; game.preload('icon0.gif'); game.onload = function() { target = new Apple(100, 0); } game.start(); }
¤ʣư褦ˤȡʤޤʣApple夫ߤäƤޤʤʬϡۤɤƱǤ¦ʣAppleβƤޤ
enchant(); SCREEN_WIDTH = 320; SCREEN_HEIGHT = 320; var Apple = enchant.Class.create(enchant.Sprite, { initialize: function(x, y){ this.WIDTH = 16; this.HEIGHT = 16; this.STEP = 5; enchant.Sprite.call(this, this.WIDTH, this.HEIGHT); this.image = game.assets['icon0.gif']; this.x = x; this.y = y; this.frame = 15; this.addEventListener('enterframe', function(){ this.move_step(); }); game.rootScene.addChild(this); }, move_step: function() { this.y += this.STEP; if (this.y >= (SCREEN_HEIGHT - this.HEIGHT)) { this.remove(); } }, remove: function(){ game.rootScene.removeChild(this); } }); window.onload = function() { game = new Game(SCREEN_WIDTH, SCREEN_HEIGHT); game.fps = 15; game.preload('icon0.gif'); game.onload = function() { targets = []; game.rootScene.addEventListener('enterframe', function(){ if((game.frame % 10) == 0){ var x = Math.floor(Math.random() * 300); targets[game.frame] = new Apple(x, 0); } }); } game.start(); }
ޤǤǴե
ˡ̣դäȡ餷ʤäƤޤ͡
ĤǤ뼫ȡŨƱɽȡʤޤ
enchant(); SCREEN_WIDTH = 320; SCREEN_HEIGHT = 320; //ĤǤ뼫 var Kuma = enchant.Class.create(enchant.Sprite, { initialize: function(x, y){ this.KUMA_WIDTH = 20; this.KUMA_HEIGHT = 30; this.KUMA_Y = 200; this.dir = 0; //ʹ 0:(right)1:(left) this.walk = 0; //ԥݡ 0: 1: 2: this.step = 5; enchant.Sprite.call(this, this.KUMA_WIDTH, this.KUMA_HEIGHT); this.image = game.assets['bear.gif']; this.x = x; this.y = this.KUMA_Y; this.frame = 0; this.addEventListener('enterframe', function() { if(game.input.right) { this.move_right(); } else if(game.input.left) { this.move_left(); } else { this.move_stop(); } this.change_frame(); }); game.rootScene.addChild(this); }, move_right: function() { this.dir = 0; if((this.walk == 0) || (this.walk == 2)){ this.walk = 1; } else if(this.walk == 1) { this.walk = 2; } if (this.x < (SCREEN_WIDTH - this.KUMA_WIDTH)) { this.x += this.step; } else { this.x = SCREEN_WIDTH - this.KUMA_WIDTH; } }, move_left: function() { this.dir = 1; if((this.walk == 0) || (this.walk == 2)){ this.walk = 1; } else if(this.walk == 1) { this.walk = 2; } if (this.x > 0) { this.x -= this.step; } else { this.x = 0; } }, move_stop: function(){ if(this.walk !== 0) { game.assets['jump.wav'].play(); } this.walk = 0; }, change_frame: function() { this.frame = this.dir * 3 + this.walk; } }); //ʣɽꥭ var Apple = enchant.Class.create(enchant.Sprite, { initialize: function(x, y){ this.WIDTH = 16; this.HEIGHT = 16; this.STEP = 5; enchant.Sprite.call(this, this.WIDTH, this.HEIGHT); this.image = game.assets['icon0.gif']; this.x = x; this.y = y; this.frame = 15; this.addEventListener('enterframe', function(){ this.move_step(); }); game.rootScene.addChild(this); }, move_step: function() { this.y += this.STEP; if (this.y >= (SCREEN_HEIGHT - this.HEIGHT)) { this.remove(); } }, remove: function(){ game.rootScene.removeChild(this); } }); window.onload = function() { game = new Game(SCREEN_WIDTH, SCREEN_HEIGHT); game.fps = 15; game.preload('bear.gif', 'icon0.gif', 'jump.wav'); game.onload = function() { player = new Kuma(0, 0); targets = []; game.rootScene.addEventListener('enterframe', function(){ if((game.frame % 10) == 0){ var x = Math.floor(Math.random() * 300); targets[game.frame] = new Apple(x, 0); } }); } game.start(); }
ޤǤǴե
Ƚդäȡäݤʤޤ͡
ꥭ餬ܿɤȽԤޤȽϡɽ뤿ʤǤ륹ץ饤(Sprite)Ƚ̿(intersect)Ȥޤ(Apple)ưȤޤȤȽԤäơäƤ顢оݤΥõ̲Ĥ餷ޤ
enchant(); SCREEN_WIDTH = 320; SCREEN_HEIGHT = 320; score = 0; //ĤǤ뼫 var Kuma = enchant.Class.create(enchant.Sprite, { initialize: function(x, y){ this.KUMA_WIDTH = 20; this.KUMA_HEIGHT = 30; this.KUMA_Y = 200; this.dir = 0; //ʹ 0:(right)1:(left) this.walk = 0; //ԥݡ 0: 1: 2: this.step = 5; enchant.Sprite.call(this, this.KUMA_WIDTH, this.KUMA_HEIGHT); this.image = game.assets['bear.gif']; this.x = x; this.y = this.KUMA_Y; this.frame = 0; this.addEventListener('enterframe', function() { if(game.input.right) { this.move_right(); } else if(game.input.left) { this.move_left(); } else { this.move_stop(); } this.change_frame(); }); game.rootScene.addChild(this); }, move_right: function() { this.dir = 0; if((this.walk == 0) || (this.walk == 2)){ this.walk = 1; } else if(this.walk == 1) { this.walk = 2; } if (this.x < (SCREEN_WIDTH - this.KUMA_WIDTH)) { this.x += this.step; } else { this.x = SCREEN_WIDTH - this.KUMA_WIDTH; } }, move_left: function() { this.dir = 1; if((this.walk == 0) || (this.walk == 2)){ this.walk = 1; } else if(this.walk == 1) { this.walk = 2; } if (this.x > 0) { this.x -= this.step; } else { this.x = 0; } }, move_stop: function(){ this.walk = 0; }, change_frame: function() { this.frame = this.dir * 3 + this.walk; } }); //ʣɽꥭ var Apple = enchant.Class.create(enchant.Sprite, { initialize: function(x, y){ this.WIDTH = 16; this.HEIGHT = 16; this.STEP = 5; enchant.Sprite.call(this, this.WIDTH, this.HEIGHT); this.image = game.assets['icon0.gif']; this.x = x; this.y = y; this.frame = 15; this.addEventListener('enterframe', function(){ this.move_step(); }); game.rootScene.addChild(this); }, move_step: function() { this.y += this.STEP; //Ƚ if(this.intersect(player)){ this.remove(); game.assets['jump.wav'].play(); } //üã if (this.y >= (SCREEN_HEIGHT - this.HEIGHT)) { this.remove(); } }, remove: function(){ game.rootScene.removeChild(this); } }); window.onload = function() { game = new Game(SCREEN_WIDTH, SCREEN_HEIGHT); game.fps = 15; game.preload('bear.gif', 'icon0.gif', 'jump.wav'); game.onload = function() { player = new Kuma(0, 0); targets = []; game.rootScene.addEventListener('enterframe', function(){ if((game.frame % 10) == 0){ var x = Math.floor(Math.random() * 300); targets[game.frame] = new Apple(x, 0); } }); } game.start(); }
ޤǤǴե
enchant.jsϡץ饰(plugin)ǵǽĥǤޤ
Ȥ⡢ץ饰ѤȺȸΨ夬ޤ
⻲ͤˤʤޤ
ץ饰ϡenchant.jsƱեľpluginsեȤǤ礦
enchant.jsषϡԤˤʤäƤޤ
줫顢ץ饰ɬפȤƱեѰդޤ
Ȥϡindex.html˥ץ饰եεҤɲäޤ
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <title>enchant</title> <script type="text/javascript" src="enchant.js"></script> <script type="text/javascript" src="plugins/nineleap.enchant.js"></script> <script type="text/javascript" src="plugins/util.enchant.js"></script> <script type="text/javascript" src="plugins/ui.enchant.js"></script> <script type="text/javascript" src="game.js"></script> <style type="text/css"> body {margin: 0;} </style> </head> <body> </body> </html>
嵭Ǥϡ10-11ܤpluginsեˤץ饰ե(nineleap.enchant.jsutil.enchant.js)ꤷƤޤץ饰ϡץ(:game.js)˵Ҥޤ
nineleap.enchant.jsɤ߹ȡॹȻ˼ưŪ˥ѥåɽޤ
nineleap.enchant.jsɤ߹ߡཪλ٤Ȥ˲Υɤޤ
game.end(game.score, "game end");
game.scoreϡǼѿ
ץ(game.onload = function()ΤȤ)ˡΥɤޤȡ֤Ƥ(ȥå)ˤʤޤ
timeLabel = new TimeLabel(8, 8); game.rootScene.addChild(timeLabel);
Τ褦˽ȥȥ
timeLabel = new TimeLabel(8, 8, "countdown"); timeLabel.time = 30; game.rootScene.addChild(timeLabel);
ɽ٥ѹˤ
timeLabel.label = "LIFE:";
ߤηв֤Фˤϡ
A = timeLabel.label;
ץΤνʬ(window.onload = function() )ˡΥɤޤ줬ˤʤޤ
game.score = 0; //ν
ץ(game.onload = function()ΤȤ)ˡΥɤޤ줬ɽ
scoreLabel = new ScoreLabel(40, 8); game.rootScene.addChild(scoreLabel);
ɲåɤȤơΥɤޤ
game.score += 10;
ɽ٥ѹˤ
scoreLabel.label = "APPLE:";
Ũ㳲ʪʤɤХХɽ뤳ȤɽȤޤ͡ΥɽˤϡȤޤȤϡȤ110ޤǤοŬ˺ФˡǤutil.enchant.jsץ饰ȤȡΤ褦˴ñ˰ޤ
A = rand(10); //
ޡȥեʤɤΥåѥåбˤˤϡΥɤɲäޤǡؤޥǡƱ褦˥Ǥޤ
var pad = new Pad(); pad.x = 0; pad.y = 220; game.rootScene.addChild(pad);
pad.xpad.yǡѥѥåɤɽ֤ꡣ
ޤǤǴե
ʣʥ̤ɽȤϡŤ碌褦˺Ǥ
enchant.jsǤϡΤ褦˽Ť̤ͤ(Scene)ȸƤӤޤ
9leapϡenchant.jsȤäƥȡƤ줿ϡѥǤ⥹ޡȥեǤͷ٤ޤ
ȥơȤƤǽˤʤۤ Ʊǥץ쥤TwitterǥեƤͤξϥɽޤ ɲäơ夫ͷ֤ȤǤޤ
9leap˥ˤϡTwitterȤɬפǤ
ϡ餬ͤˤʤޤ
Ȥ饯ǤϤӤΤǡطʤɽƤߤޤ
طʤˤϡطʿꤹˡȲꤹˡޤ
طʿꤹˤϡΤ褦˥(game.rootScene)طʿ(backgroundColor)RGBꤷޤ
game.rootScene.backgroundColor = 'rgb(182, 255, 255)';
طʲɽˤϡޤطʤθˤʤǺѰդޤϡΤ褦93ޥǺ(map2.gif)Ȥޤ
93ޥβϡΤ褦ֹƤޤ
0, 1, 2, 3, 4, 5, 6, 7, 8 9,10,11,12,13,14,15,16,17 18,19,20,21,22,23,24,25,26
ˡβɤΤ褦ˤʤ٤뤫ͤǻꤷޤ
Ǻ֤Ȥˤϡֹꤷޤ ʤˤʤȤϡ-1פꤷޤ
ϡ20ޥ10ޥβطʤȤɽޤ
var blocks = [ [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1], [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1], [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1], [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1], [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1], [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1], [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1], [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1], [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3], ];
ºݤ֤ˤϡΤ褦ˤޤ
var map = new Map(16, 16); map.image = game.assets['map2.gif']; map.loadData(blocks);
ޤǤǴե
ޤǡenchant.jsΥץäƤ顢ΥȤˤɤޤȤޤäƤΤȯȥǥˤɤ夯Τݤ˴ޤǡƤޤ