20 lines
266 B
CoffeeScript
20 lines
266 B
CoffeeScript
class Silo
|
|
constructor: ->
|
|
@frame = 0
|
|
window.setInterval @changeAnimation, 500
|
|
|
|
tick: (tile)->
|
|
|
|
sprite: ->
|
|
[@frame*8, 8, 8, 8]
|
|
|
|
isMoveable: ->
|
|
false
|
|
|
|
changeAnimation: =>
|
|
if @frame == 2
|
|
@frame = 0
|
|
else
|
|
@frame += 1
|
|
|