Created
May 9, 2013 23:06
-
-
Save pyrobot/5551273 to your computer and use it in GitHub Desktop.
impactjs smoke test
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
ig.module( | |
'game.main' | |
).requires( | |
'impact.game' | |
'impact.font' | |
).defines -> | |
MyGame = ig.Game.extend | |
font: new ig.Font('media/04b03.font.png') | |
init: -> | |
# Initialize your game here; bind keys etc. | |
update: -> | |
# Update all entities and backgroundMaps | |
@parent() | |
draw: -> | |
@parent() | |
x = ig.system.width/2 | |
y = ig.system.height/2 | |
@font.draw 'It Works!', x, y, ig.Font.ALIGN.CENTER | |
# Start the Game with 60fps, a resolution of 320x240, scaled up by a factor of 2 | |
ig.main '#canvas', MyGame, 60, 320, 240, 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment