Merge branch 'master' of https://github.com/arg-games/ld31
Conflicts: src/app.coffee
|
@ -8,4 +8,6 @@ Title: Entire game on one screen
|
|||
** "tote" flächen einbauen (krater, berge) :jonas:aaron:
|
||||
** Spielstart in irgend einer weise ... (grafik)
|
||||
** Hint für shortcuts anzeigen :ruben:
|
||||
** Preise für entities :ruben:
|
||||
** Preise für entities :ruben:
|
||||
** Silos: Farben je nach Kapazität einfärben
|
||||
** Game balancing :D
|
||||
|
|
Before Width: | Height: | Size: 672 B After Width: | Height: | Size: 662 B |
BIN
public/images/deadtiles.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.5 KiB |
|
@ -5,7 +5,7 @@ app = playground(
|
|||
smoothing: false,
|
||||
|
||||
create: ->
|
||||
@loadImages "layers", "active", "progress", "selected", "entities", "hud", "actions", "speechbubbles"
|
||||
@loadImages "layers", "active", "progress", "selected", "entities", "hud", "actions", "speechbubbles", "deadtiles"
|
||||
@currentHoveredTile = new Tile
|
||||
|
||||
ready: ->
|
||||
|
|
|
@ -6,12 +6,14 @@ class Tile
|
|||
@layers.push new Tilelayer(
|
||||
type: restype,
|
||||
depth: i,
|
||||
amount: Math.round(Math.random(app.game.maxTileAmount-10)+10)
|
||||
amount: Math.round(Math.random()*app.game.maxTileAmount)+1
|
||||
)
|
||||
|
||||
@currentLayer = 0
|
||||
@entity = null
|
||||
@isActive = false
|
||||
@isBuildable = !(Math.round(Math.random()*10) == 5)
|
||||
@randomSeed = Math.round(Math.random()*10)
|
||||
|
||||
click: (button)->
|
||||
if button == "left"
|
||||
|
@ -46,6 +48,10 @@ class Tile
|
|||
tileLayer = @getCurrentLayer()
|
||||
app.layer.drawRegion app.images.layers, tileLayer.sprite, x*8, y*8
|
||||
|
||||
unless @isBuildable
|
||||
app.layer.drawRegion app.images.deadtiles, [8*@randomSeed, 0, 8, 8], x*8, y*8
|
||||
return
|
||||
|
||||
if @entity
|
||||
app.layer.drawRegion app.images.entities, @entity.sprite(), x*8, y*8
|
||||
|
||||
|
|