2014-12-07 00:19:22 +01:00
|
|
|
class Base
|
2014-12-07 14:45:13 +01:00
|
|
|
constructor: ->
|
|
|
|
@frame = 0
|
|
|
|
|
|
|
|
window.setInterval @changeAnimation, 500
|
|
|
|
|
2014-12-07 00:19:22 +01:00
|
|
|
tick: (tile)->
|
|
|
|
|
|
|
|
sprite: ->
|
2014-12-07 14:45:13 +01:00
|
|
|
[@frame*8, 0, 8, 8]
|
2014-12-07 00:19:22 +01:00
|
|
|
|
2014-12-07 17:04:40 +01:00
|
|
|
spritedetail: ->
|
|
|
|
[0, 0, 16, 16]
|
|
|
|
|
2014-12-07 00:19:22 +01:00
|
|
|
isMoveable: ->
|
|
|
|
false
|
2014-12-07 00:46:46 +01:00
|
|
|
|
2014-12-07 14:45:13 +01:00
|
|
|
changeAnimation: =>
|
|
|
|
if @frame == 3
|
|
|
|
@frame = 0
|
|
|
|
else
|
|
|
|
@frame += 1
|
|
|
|
|
2014-12-07 16:17:10 +01:00
|
|
|
spaceProvided: 300
|
2014-12-07 18:37:04 +01:00
|
|
|
energyProvided: 7
|
2014-12-07 14:07:13 +01:00
|
|
|
isDockable: true
|