Refactor the folder structure
This commit is contained in:
parent
903949c306
commit
c4ba7c582b
6 changed files with 5 additions and 10 deletions
|
@ -21,7 +21,7 @@ gulp.task('server', 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(coffee({bare: true}))
|
||||
.pipe(concat('app.js'))
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
class BaseEntity
|
||||
constructor: (options) ->
|
||||
{} = options
|
|
@ -1,3 +1,3 @@
|
|||
class Miner extends BaseEntity
|
||||
class Miner
|
||||
tick: (tile) ->
|
||||
tile.click "left"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
class Tile extends BaseEntity
|
||||
constructor: (options) ->
|
||||
super options
|
||||
|
||||
class Tile
|
||||
constructor: ->
|
||||
resTypes = (k for own k of app.game.resources)
|
||||
|
||||
@layers = []
|
|
@ -1,4 +1,4 @@
|
|||
class Tilelayer extends BaseEntity
|
||||
class Tilelayer
|
||||
constructor: (options)->
|
||||
{@type, @depth, @amount} = options
|
||||
@randomFactor = getRandomInt 0, 4
|
Loading…
Reference in a new issue