Forked from: fg16078's 伊東ライフ0 View Diff (41) forked: 伊東ライフ0 fg16078 Follow 2018-04-17 14:43:19 License: MIT License Fork0 Fav0 View24 Play Stop Reload Fullscreen Smart Phone Readme JavaScript 55 lines HTML 1 lines CSS 10 lines forked: 伊東ライフ0 ui.enchant.js enchant.js 0.8.3 // forked from fg16078's "伊東ライフ0" http://jsdo.it/fg16078/itoLife // forked from .sudo's "enchant.js 0.8.3用プロジェクトテンプレート" http://jsdo.it/.sudo/TMP2 window.focus(); enchant(); var SCREEN_WIDTH=320; var SCREEN_HEIGHT=320; var ramdfloat=function(min,max){ return Math.random()*(max-min)+min; }; window.onload = function() { game=new Game(SCREEN_WIDTH,SCREEN_HEIGHT); game.preload("http://jsrun.it/assets/q/U/2/V/qU2VK.png"); game.onload = function() { var scene=game.rootScene; var pad = new Pad(); scene.addChild(pad); pad.moveTo(0,220); var kuma0=new Sprite(32,32); kuma0.image=game.assets["http://jsrun.it/assets/q/U/2/V/qU2VK.png"]; kuma0.moveTo(0,0); kuma0.frame=19; scene.addChild(kuma0); game.rootScene.addEventListener('enterframe', function() { // クマを動かす if(game.input.left) { kuma0.x=kuma0.x-5; } if(game.input.right) { kuma0.x=kuma0.x+5; } if(game.input.up) { kuma0.y=kuma0.y-5; } if(game.input.down) { kuma0.y=kuma0.y+5; } }); }; game.start(); }; <p id='helloWorld'></p> forked: 伊東ライフ0 * { margin: 0; padding: 0; border: 0; } body { background: #fff; font: 30px sans-serif; } // forked from fg16078's "伊東ライフ0" http://jsdo.it/fg16078/itoLife // forked from .sudo's "enchant.js 0.8.3用プロジェクトテンプレート" http://jsdo.it/.sudo/TMP2 window.focus(); enchant(); var SCREEN_WIDTH=320; var SCREEN_HEIGHT=320; var ramdfloat=function(min,max){ return Math.random()*(max-min)+min; }; window.onload = function() { game=new Game(SCREEN_WIDTH,SCREEN_HEIGHT); game.preload("http://jsrun.it/assets/q/U/2/V/qU2VK.png"); game.onload = function() { var scene=game.rootScene; var pad = new Pad(); scene.addChild(pad); pad.moveTo(0,220); var kuma0=new Sprite(32,32); kuma0.image=game.assets["http://jsrun.it/assets/q/U/2/V/qU2VK.png"]; kuma0.moveTo(0,0); kuma0.frame=19; scene.addChild(kuma0); game.rootScene.addEventListener('enterframe', function() { // クマを動かす if(game.input.left) { kuma0.x=kuma0.x-5; } if(game.input.right) { kuma0.x=kuma0.x+5; } if(game.input.up) { kuma0.y=kuma0.y-5; } if(game.input.down) { kuma0.y=kuma0.y+5; } }); }; game.start(); }; <p id='helloWorld'></p> * { margin: 0; padding: 0; border: 0; } body { background: #fff; font: 30px sans-serif; } use an iframe compat browser, deer Play on jsdo.it games Author Share ブログに埋め込む QR Tag Download Complete! Description What kind of game? Control Device Smartphone Controllerjsdo.it WebSocket Controller» Mouse Keyboard Touch Device Fullscreen Activated Inactivated jsdo.it games から削除する Submit Author fg16078 Tweet Default Panel Auto play Screenshot Readme JavaScript HTML CSS Size Width: px Height: px code <script type="text/javascript" src="http://jsdo.it/blogparts/ELi1/js"></script> application java script Discussion Questions on this code? Tags application java script