2014-12-06 21:36:19 +01:00
|
|
|
class Tilelayer
|
2014-12-06 17:17:30 +01:00
|
|
|
constructor: (options)->
|
2014-12-06 12:37:57 +01:00
|
|
|
{@type, @depth, @amount} = options
|
2014-12-06 14:52:03 +01:00
|
|
|
@randomFactor = getRandomInt 0, 4
|
2014-12-06 15:09:56 +01:00
|
|
|
@sprite = [@randomFactor*8, @depth*8, 8, 8]
|
2014-12-06 17:17:30 +01:00
|
|
|
|
|
|
|
collect: ->
|
|
|
|
return false if @amount == 0
|
|
|
|
@amount -= 1
|