detail entities
This commit is contained in:
parent
b510790ef8
commit
270014db3d
10 changed files with 16 additions and 7 deletions
|
@ -11,7 +11,6 @@ Title: Entire game on one screen
|
|||
* TODO HUD
|
||||
** hud: energie progress bar :aaron:
|
||||
** hud: resources "release to space" on click :aaron:
|
||||
** selektierte entity in großansicht anzeigen :aaron::jonas:
|
||||
** Hint für shortcuts anzeigen :ruben:
|
||||
** Preise für entities :ruben:
|
||||
|
||||
|
@ -19,7 +18,6 @@ Title: Entire game on one screen
|
|||
** solarpanel item :aaron:
|
||||
|
||||
* TODO Polishing
|
||||
** "tote" flächen: nicht klickbar :aaron:
|
||||
|
||||
* TODO OUTRO
|
||||
** animation bei voller energybar: typ fliegt davon
|
||||
|
|
BIN
public/images/entitydetails.png
Normal file
BIN
public/images/entitydetails.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
public/images/layerdetails.png
Normal file
BIN
public/images/layerdetails.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.5 KiB |
|
@ -5,7 +5,7 @@ app = playground(
|
|||
smoothing: false,
|
||||
|
||||
create: ->
|
||||
@loadImages "layers", "active", "progress", "selected", "entities", "hud", "actions", "speechbubbles", "deadtiles"
|
||||
@loadImages "layers", "active", "progress", "selected", "entities", "hud", "actions", "speechbubbles", "deadtiles", "layerdetails", "entitydetails"
|
||||
@currentHoveredTile = new Tile
|
||||
|
||||
ready: ->
|
||||
|
|
|
@ -9,6 +9,9 @@ class Base
|
|||
sprite: ->
|
||||
[@frame*8, 0, 8, 8]
|
||||
|
||||
spritedetail: ->
|
||||
[0, 0, 16, 16]
|
||||
|
||||
isMoveable: ->
|
||||
false
|
||||
|
||||
|
|
|
@ -9,6 +9,9 @@ class Miner
|
|||
sprite: ->
|
||||
[@frame*8, 16, 8, 8]
|
||||
|
||||
spritedetail: ->
|
||||
[0, 16*2, 16, 16]
|
||||
|
||||
isMoveable: ->
|
||||
true
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@ class Silo
|
|||
sprite: ->
|
||||
[@frame*8, 8, 8, 8]
|
||||
|
||||
spritedetail: ->
|
||||
[0, 16, 16, 16]
|
||||
|
||||
isMoveable: ->
|
||||
false
|
||||
|
||||
|
|
|
@ -22,11 +22,12 @@ app.game.hud =
|
|||
if currentSelectedTile != null
|
||||
panelusage = 'tile'
|
||||
|
||||
app.layer.drawRegion app.images.layers, currentSelectedTile.getCurrentLayer().sprite, 15, 100
|
||||
|
||||
if currentSelectedTile.entity
|
||||
panelusage = 'entity'
|
||||
app.layer.drawRegion app.images.entities, currentSelectedTile.entity.sprite(), 15, 100
|
||||
app.layer.drawRegion app.images.entitydetails, currentSelectedTile.entity.spritedetail(), 12, 95
|
||||
else
|
||||
app.layer.drawRegion app.images.layerdetails, currentSelectedTile.getCurrentLayer().spritedetail, 12, 95
|
||||
|
||||
# silo capacity
|
||||
usedSiloStoragePercent = Math.round((100 / app.game.availableSiloStorage()) * app.game.usedSiloStorage())
|
||||
|
|
|
@ -3,6 +3,7 @@ class Tilelayer
|
|||
{@type, @depth, @amount} = options
|
||||
@randomFactor = getRandomInt 0, 4
|
||||
@sprite = [@randomFactor*8, @depth*8, 8, 8]
|
||||
@spritedetail = [0, @depth*16, 16, 16]
|
||||
@hudSprite = [@randomFactor*8, @depth*8, 4, 4]
|
||||
|
||||
collect: ->
|
||||
|
|
Loading…
Reference in a new issue