This commit is contained in:
Aaron Mueller 2014-12-06 09:24:36 +01:00
parent b6492202c2
commit c947c4ac08
3 changed files with 36 additions and 25 deletions

View file

@ -7,8 +7,14 @@
<script src="vendors/jquery-1.11.1.min.js"></script>
<script src="vendors/canvasquery.js"></script>
<script src="vendors/playground.js"></script>
<script src="app.js"></script>
<style>
html, body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<script src="app.js"></script>
</body>
</html>

View file

@ -1,9 +1,17 @@
game = {
start: ->
hud: ->
app
.layer
.fillStyle "#00f"
.fillRect 0, 0, 200, 50
step: ->
this.hud
resources:
ore: 0
ore: 50
stone: 100
}

View file

@ -1,25 +1,22 @@
$ ->
playground({
app = playground({
width: 16*20,
height: 16*20,
scaleToFit: true,
smoothing: false,
create: ->
# TODO: Load images
@createTestTiles()
createTestTiles: ->
testTile1 = new Tile
testTile2 = new Tile
create: ->
@createTestTiles()
ready: ->
game.start
this.setState(game)
@setState game
step: ->
render: ->
this.layer.clear("#333");
this.layer.clear("#000");
})