Created
December 11, 2011 03:02
-
-
Save robashton/1457963 to your computer and use it in GitHub Desktop.
game.js
This file contains hidden or 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
| var engine = new EngineBuilder('colour') | |
| .nearestPoint(8.0) | |
| .sceneWidth(640) | |
| .sceneHeight(480) | |
| .backgroundColour(10, 10, 150) | |
| .build(); | |
| var world = engine.world(); | |
| var scene = new Scene(world); | |
| var hud = new Hud(scene); | |
| scene.addLayer(3.0); | |
| scene.addLayer(5.0); | |
| scene.addLayer(8.0); | |
| scene.addEntity(new Clouds(3.0, 20, 250)); | |
| scene.addEntity(new Clouds(5.0, 10, 250)); | |
| scene.addEntity(new Aircraft('player', 8.0)); | |
| scene.addEntity(new Stars(8.0, 60, 6, 30)); | |
| scene.addEntity(new Pigeons(8.0, 60, 5, 30)); | |
| scene.addEntity(new Controller('player', document.getElementById('colour'))); | |
| scene.addEntity(new LayerScroller()); | |
| scene.addEntity(new Scores()); | |
| scene.addEntity(new PlayerKiller(3)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment