19 lines
529 B
CoffeeScript
19 lines
529 B
CoffeeScript
class Tilelayer extends BaseEntity
|
|
constructor: (options) ->
|
|
{@type, @depth, @amount} = options
|
|
|
|
render: (layer, x, y) ->
|
|
switch @type
|
|
when "stardust" then color = [0, 0, 8, 8]
|
|
when "bedrock" then color = [0, 0, 8, 8]
|
|
when "lubinit" then color = [0, 0, 8, 8]
|
|
when "oxodum" then color = [0, 0, 8, 8]
|
|
when "notch" then color = [0, 0, 8, 8]
|
|
|
|
#layer.fillStyle color
|
|
# .fillRect x*8, y*8, 8, 8
|
|
|
|
layer.drawRegion app.images.layers, color, x*8, y*8
|
|
|
|
getSpriteForType: (i) ->
|
|
|