First working version
This commit is contained in:
parent
e907b1a5ba
commit
7234373153
3 changed files with 13 additions and 5 deletions
|
@ -23,7 +23,7 @@ gulp.task('server', function() {
|
||||||
gulp.task('compile', function() {
|
gulp.task('compile', function() {
|
||||||
return gulp.src(['src/*.coffee'])
|
return gulp.src(['src/*.coffee'])
|
||||||
.pipe(sourcemaps.init())
|
.pipe(sourcemaps.init())
|
||||||
.pipe(coffee())
|
.pipe(coffee({bare: true}))
|
||||||
.pipe(uglify())
|
.pipe(uglify())
|
||||||
.pipe(concat('app.js'))
|
.pipe(concat('app.js'))
|
||||||
.pipe(sourcemaps.write())
|
.pipe(sourcemaps.write())
|
||||||
|
|
9
src/game.coffee
Normal file
9
src/game.coffee
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
game = {
|
||||||
|
start: ->
|
||||||
|
|
||||||
|
step: ->
|
||||||
|
|
||||||
|
resources:
|
||||||
|
ore: 0
|
||||||
|
stone: 100
|
||||||
|
}
|
|
@ -9,12 +9,11 @@ $ ->
|
||||||
# TODO: Load images
|
# TODO: Load images
|
||||||
|
|
||||||
ready: ->
|
ready: ->
|
||||||
# TODO: Start the game
|
game.start
|
||||||
# TODO: setTimeout?
|
this.setState(game)
|
||||||
|
|
||||||
step: ->
|
step: ->
|
||||||
# TODO: For internal stuff like progress bar
|
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
# TODO: this.game.render?
|
this.layer.clear("#333");
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue