ld31-space-diggers/src/entities/tilelayer.coffee
2014-12-06 17:20:10 +01:00

10 lines
252 B
CoffeeScript

class Tilelayer extends BaseEntity
constructor: (options)->
{@type, @depth, @amount} = options
@randomFactor = getRandomInt 0, 4
@sprite = [@randomFactor*8, @depth*8, 8, 8]
collect: ->
return false if @amount == 0
@amount -= 1