Fixed some bugs, made gameplay better

master
Ruben Müller 8 years ago
parent 661af48fd7
commit 4a0278e90c
  1. BIN
      public/images/buildinfo.png
  2. BIN
      public/images/speechbubbles.png
  3. BIN
      public/images/speechbubbles.psd
  4. 2
      src/entities/base.coffee
  5. 7
      src/entities/miner.coffee
  6. 2
      src/entities/silo.coffee
  7. 10
      src/game.coffee
  8. 2
      src/hud.coffee
  9. 2
      src/tiles/tile.coffee

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

@ -21,6 +21,6 @@ class Base
else
@frame += 1
spaceProvided: 300
spaceProvided: 30
energyProvided: 7
isDockable: true

@ -3,8 +3,11 @@ class Miner
@frame = 0
window.setInterval @changeAnimation, 500
tick: (tile)->
tile.click "left"
tick: (tile) ->
tile.click "left"
tile.click "left"
tile.click "left"
tile.click "left"
sprite: ->
[@frame*8, 16, 8, 8]

@ -20,7 +20,7 @@ class Silo
else
@frame += 1
spaceProvided: 150
spaceProvided: 15
energyProvided: 0
isDockable: true

@ -4,8 +4,6 @@ app.game =
@map[i] = new Tile(i)
@map[20*5+10].entity = new Base
# TODO: BUG BUG: ... the base is some time replaced by a tile ...
@mouseX = 0
@mouseY = 0
@currentHoveredTile = new Tile(-1)
@ -158,7 +156,7 @@ app.game =
createMiner: ->
if @currentSelectedTile and !@currentSelectedTile.entity
if @checkResource('lubinit', 10, true)
if @checkResource('lubinit', 5, true)
@currentSelectedTile.entity = new Miner
else
@speechbubble.say 'nores'
@ -168,7 +166,7 @@ app.game =
createSilo: ->
if @currentSelectedTile
if @checkPosition(@currentSelectedTile)
if @checkResource('dirt', 10, true)
if @checkResource('dirt', 5, true)
@currentSelectedTile.entity = new Silo
else
@speechbubble.say 'nores'
@ -181,7 +179,7 @@ app.game =
createSolarpanel: ->
if @currentSelectedTile
if @checkPosition(@currentSelectedTile)
if @checkResource('notch', 10, true)
if @checkResource('notch', 30, true)
@currentSelectedTile.entity = new Solarpanel
else
@speechbubble.say 'nores'
@ -230,7 +228,7 @@ app.game =
map: []
miners: []
maxTileAmount: 15
maxTileAmount: 75
availableSiloStorage: ->
space = 0

@ -73,7 +73,7 @@ app.game.hud =
showBuildInfo: ->
clearTimeout(@timeout) if @timeout
@buildinfo = true
@timeout = window.setTimeout @hideBuildInfo, 4000
@timeout = window.setTimeout @hideBuildInfo, 6000
hideBuildInfo: ->
app.game.hud.buildinfo = false

@ -14,7 +14,7 @@ class Tile
@entity = null
@isActive = false
@isBuildable = !(Math.round(Math.random()*10) == 5)
@isBuildable = true if @isBuildable == 20*5+10
@isBuildable = true if @position == 20*5+10
@randomSeed = Math.round(Math.random()*10)
click: (button)->

Loading…
Cancel
Save