提交 53b0bd2e 编写于 作者: G Gabriele Cirulli

move scripts to bottom of body

上级 2e5ab789
...@@ -6,14 +6,6 @@ ...@@ -6,14 +6,6 @@
<link href="style/main.css" rel="stylesheet" type="text/css"> <link href="style/main.css" rel="stylesheet" type="text/css">
<script src="js/hammer.min.js"></script>
<script src="js/keyboard_input_manager.js"></script>
<script src="js/html_actuator.js"></script>
<script src="js/grid.js"></script>
<script src="js/tile.js"></script>
<script src="js/game_manager.js"></script>
<script src="js/application.js"></script>
<meta name="HandheldFriendly" content="True"> <meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320"> <meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no">
...@@ -74,5 +66,13 @@ ...@@ -74,5 +66,13 @@
Created by <a href="http://gabrielecirulli.com" target="_blank">Gabriele Cirulli.</a> Based on <a href="https://itunes.apple.com/us/app/1024!/id823499224" target="_blank">1024 by Veewo Studio</a> and conceptually similar to <a href="http://asherv.com/threes/" target="_blank">Threes by Asher Vollmer.</a> Created by <a href="http://gabrielecirulli.com" target="_blank">Gabriele Cirulli.</a> Based on <a href="https://itunes.apple.com/us/app/1024!/id823499224" target="_blank">1024 by Veewo Studio</a> and conceptually similar to <a href="http://asherv.com/threes/" target="_blank">Threes by Asher Vollmer.</a>
</p> </p>
</div> </div>
<script src="js/hammer.min.js"></script>
<script src="js/keyboard_input_manager.js"></script>
<script src="js/html_actuator.js"></script>
<script src="js/grid.js"></script>
<script src="js/tile.js"></script>
<script src="js/game_manager.js"></script>
<script src="js/application.js"></script>
</body> </body>
</html> </html>
document.addEventListener("DOMContentLoaded", function () { // Wait till the browser is ready to render the game (avoids glitches)
// Wait till the browser is ready to render the game (avoids glitches) window.requestAnimationFrame(function () {
window.requestAnimationFrame(function () { var manager = new GameManager(4, KeyboardInputManager, HTMLActuator);
var manager = new GameManager(4, KeyboardInputManager, HTMLActuator);
});
}); });
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册