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() {
|
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'))
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
class BaseEntity
|
|
||||||
constructor: (options) ->
|
|
||||||
{} = options
|
|
|
@ -1,3 +1,3 @@
|
||||||
class Miner extends BaseEntity
|
class Miner
|
||||||
tick: (tile) ->
|
tick: (tile) ->
|
||||||
tile.click "left"
|
tile.click "left"
|
||||||
|
|
|
@ -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 = []
|
|
@ -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
|
Loading…
Reference in a new issue