diff --git a/notes.org b/notes.org index ca4b2de..6b545c2 100644 --- a/notes.org +++ b/notes.org @@ -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 @@ -28,4 +26,4 @@ Title: Entire game on one screen * TODO EXTRA Polishing ** game balancing ** Miner verschieben -** Silos: Farben je nach Kapazität einfärben \ No newline at end of file +** Silos: Farben je nach Kapazität einfärben diff --git a/public/images/entitydetails.png b/public/images/entitydetails.png new file mode 100644 index 0000000..51e86d8 Binary files /dev/null and b/public/images/entitydetails.png differ diff --git a/public/images/layerdetails.png b/public/images/layerdetails.png new file mode 100644 index 0000000..113a8bd Binary files /dev/null and b/public/images/layerdetails.png differ diff --git a/public/images/layers-details.png b/public/images/layers-details.png deleted file mode 100644 index 8116c52..0000000 Binary files a/public/images/layers-details.png and /dev/null differ diff --git a/src/app.coffee b/src/app.coffee index ea953ed..56660d6 100644 --- a/src/app.coffee +++ b/src/app.coffee @@ -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: -> diff --git a/src/entities/base.coffee b/src/entities/base.coffee index 553b779..142b1d2 100644 --- a/src/entities/base.coffee +++ b/src/entities/base.coffee @@ -9,6 +9,9 @@ class Base sprite: -> [@frame*8, 0, 8, 8] + spritedetail: -> + [0, 0, 16, 16] + isMoveable: -> false diff --git a/src/entities/miner.coffee b/src/entities/miner.coffee index 99cf553..7757474 100644 --- a/src/entities/miner.coffee +++ b/src/entities/miner.coffee @@ -9,6 +9,9 @@ class Miner sprite: -> [@frame*8, 16, 8, 8] + spritedetail: -> + [0, 16*2, 16, 16] + isMoveable: -> true diff --git a/src/entities/silo.coffee b/src/entities/silo.coffee index a4baae9..437d602 100644 --- a/src/entities/silo.coffee +++ b/src/entities/silo.coffee @@ -6,7 +6,10 @@ class Silo tick: (tile)-> sprite: -> - [@frame*8, 8, 8, 8] + [@frame*8, 8, 8, 8] + + spritedetail: -> + [0, 16, 16, 16] isMoveable: -> false diff --git a/src/hud.coffee b/src/hud.coffee index b6c1544..b41bfdc 100644 --- a/src/hud.coffee +++ b/src/hud.coffee @@ -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()) diff --git a/src/tiles/tilelayer.coffee b/src/tiles/tilelayer.coffee index 6c1ec1d..a38e7b9 100644 --- a/src/tiles/tilelayer.coffee +++ b/src/tiles/tilelayer.coffee @@ -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: ->