Last active
August 29, 2015 14:13
-
-
Save ochaochaocha3/d37799b4fe26e34ec7bb to your computer and use it in GitHub Desktop.
enchant.js: Hello World
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang='ja'> | |
<head> | |
<meta charset='UTF-8'> | |
<title>Hello World</title> | |
</head> | |
<body> | |
<!-- https://github.com/uei/enchant.js-builds/blob/master/build/enchant.js からダウンロードしてくる --> | |
<script src='enchant.js'></script> | |
<script src='main.js'></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enchant(); | |
window.onload = function WindowOnLoad() { | |
var | |
game = new Core(960, 640), | |
sceneGameMain = new Scene(), | |
label = new Label('Hello World'); | |
label.x = 200; | |
label.y = 100; | |
sceneGameMain.addChild(label); | |
game.pushScene(sceneGameMain); | |
game.start(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment