topical media & game development
mobile-game-ch10-input-test.htm / htm
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Input Test</title>
<meta name='viewport' content='width=device-width, user-scalable=no'>
<script src='mobile-game-ch10-jquery.min.js'></script>
<script src='mobile-game-ch10-underscore.js'></script>
<script src='mobile-game-ch10-quintus.js'></script>
<script src='mobile-game-ch10-quintus-input.js'></script>
<style> body { margin:0px; padding:0px; } </style>
</head>
<body>
<script>
var q = Quintus()
.include("Input")
.setup()
.controls(true);
q.input.bind('fire',function() {
console.log('fire!');
});
q.input.bind('fireUp',function() {
console.log('fire up');
});
q.gameLoop(function() {
q.clear();
q.input.drawCanvas();
});
q.el.css('backgroundColor','#666');
</script>
</body>
</html>
(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.