|
|
|
@ -3,6 +3,7 @@ app.game.hud =
|
|
|
|
|
resTypes = (k for own k of app.game.resources)
|
|
|
|
|
|
|
|
|
|
@position = x: 45, y: 103
|
|
|
|
|
@buildinfo = false
|
|
|
|
|
|
|
|
|
|
@itemArrow = new AnimatedItem maxFrames: 10, image: app.images.actions, speed: 50
|
|
|
|
|
|
|
|
|
@ -18,6 +19,11 @@ app.game.hud =
|
|
|
|
|
|
|
|
|
|
app.layer.drawImage app.images.hud, 0, 11*8
|
|
|
|
|
|
|
|
|
|
if @buildinfo
|
|
|
|
|
app.layer.drawRegion app.images.buildinfo, [0, 0, 106, 10], 1, 1
|
|
|
|
|
app.layer.drawRegion app.images.buildinfo, [0, 10, 106, 10], 1, 12
|
|
|
|
|
app.layer.drawRegion app.images.buildinfo, [0, 20, 106, 10], 1, 23
|
|
|
|
|
|
|
|
|
|
currentSelectedTile = app.game.currentSelectedTile
|
|
|
|
|
if currentSelectedTile != null
|
|
|
|
|
panelusage = 'tile'
|
|
|
|
@ -53,6 +59,14 @@ app.game.hud =
|
|
|
|
|
when 'resources'
|
|
|
|
|
@showResources()
|
|
|
|
|
|
|
|
|
|
showBuildInfo: ->
|
|
|
|
|
clearTimeout(@timeout) if @timeout
|
|
|
|
|
@buildinfo = true
|
|
|
|
|
@timeout = window.setTimeout @hideBuildInfo, 2000
|
|
|
|
|
|
|
|
|
|
hideBuildInfo: ->
|
|
|
|
|
app.game.hud.buildinfo = false
|
|
|
|
|
|
|
|
|
|
showResources: ->
|
|
|
|
|
# resources
|
|
|
|
|
i = 0
|
|
|
|
|