Refactor the folder structure

This commit is contained in:
Aaron Mueller 2014-12-06 21:36:19 +01:00
parent 903949c306
commit c4ba7c582b
6 changed files with 5 additions and 10 deletions

View file

@ -21,7 +21,7 @@ gulp.task('server', function() {
}); });
gulp.task('compile', function() { gulp.task('compile', function() {
return gulp.src(['src/entities/*.coffee', 'src/tools.coffee', 'src/main.coffee', 'src/game.coffee', 'src/hud.coffee']) return gulp.src(['src/entities/*.coffee', 'src/tiles/*.coffee', 'src/tools.coffee', 'src/app.coffee', 'src/game.coffee', 'src/hud.coffee'])
.pipe(sourcemaps.init()) .pipe(sourcemaps.init())
.pipe(coffee({bare: true})) .pipe(coffee({bare: true}))
.pipe(concat('app.js')) .pipe(concat('app.js'))

View file

@ -1,3 +0,0 @@
class BaseEntity
constructor: (options) ->
{} = options

View file

@ -1,3 +1,3 @@
class Miner extends BaseEntity class Miner
tick: (tile) -> tick: (tile) ->
tile.click "left" tile.click "left"

View file

@ -1,7 +1,5 @@
class Tile extends BaseEntity class Tile
constructor: (options) -> constructor: ->
super options
resTypes = (k for own k of app.game.resources) resTypes = (k for own k of app.game.resources)
@layers = [] @layers = []

View file

@ -1,4 +1,4 @@
class Tilelayer extends BaseEntity class Tilelayer
constructor: (options)-> constructor: (options)->
{@type, @depth, @amount} = options {@type, @depth, @amount} = options
@randomFactor = getRandomInt 0, 4 @randomFactor = getRandomInt 0, 4