Fixed some bugs, made gameplay better

This commit is contained in:
Ruben Müller 2014-12-07 20:48:54 +01:00
parent 661af48fd7
commit 4a0278e90c
9 changed files with 13 additions and 12 deletions

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.

View file

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

View file

@ -3,7 +3,10 @@ class Miner
@frame = 0
window.setInterval @changeAnimation, 500
tick: (tile)->
tick: (tile) ->
tile.click "left"
tile.click "left"
tile.click "left"
tile.click "left"
sprite: ->

View file

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

View file

@ -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

View file

@ -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

View file

@ -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)->