|
@@ -17,6 +17,8 @@ function love.load()
|
|
|
loadGame()
|
|
loadGame()
|
|
|
require("ui")
|
|
require("ui")
|
|
|
require("data")
|
|
require("data")
|
|
|
|
|
+
|
|
|
|
|
+ local stoneShow = Stones
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
-- ==================================================================================
|
|
-- ==================================================================================
|
|
@@ -24,12 +26,14 @@ end
|
|
|
|
|
|
|
|
function love.update(dt)
|
|
function love.update(dt)
|
|
|
Dtotal = Dtotal + dt
|
|
Dtotal = Dtotal + dt
|
|
|
-
|
|
|
|
|
- if math.floor(Dtotal) > DtotalFloor then
|
|
|
|
|
- local diff = math.floor(Dtotal) - DtotalFloor
|
|
|
|
|
- DtotalFloor = DtotalFloor + diff
|
|
|
|
|
- updateStocks(diff)
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if math.floor(Dtotal*10) > DtotalFloor*10 then
|
|
|
|
|
+ updateCraft(dt)
|
|
|
|
|
+ DtotalFloor = math.floor(Dtotal)
|
|
|
end
|
|
end
|
|
|
|
|
+
|
|
|
|
|
+ Stones = Stones + StonesSec * dt
|
|
|
|
|
+ stoneShow = math.floor(Stones*100 + StonesSec*100) / 100
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
-- ==================================================================================
|
|
-- ==================================================================================
|
|
@@ -38,7 +42,8 @@ end
|
|
|
function love.draw()
|
|
function love.draw()
|
|
|
love.graphics.setColor(colorWhite)
|
|
love.graphics.setColor(colorWhite)
|
|
|
love.graphics.print("Hello World! Since "..DtotalFloor.."sec", 400, 300)
|
|
love.graphics.print("Hello World! Since "..DtotalFloor.."sec", 400, 300)
|
|
|
- love.graphics.print(math.floor(Stones).." Stones", 400, 340)
|
|
|
|
|
|
|
+ love.graphics.print(stoneShow, 400, 340)
|
|
|
|
|
+ love.graphics.print("Stones", 450, 340)
|
|
|
|
|
|
|
|
-- DRAW CRAFTERS
|
|
-- DRAW CRAFTERS
|
|
|
-- ===========================
|
|
-- ===========================
|
|
@@ -51,6 +56,7 @@ function love.draw()
|
|
|
"fill", crft.ui.x, crft.ui.y, crft.ui.w, crft.ui.h, 5, 5)
|
|
"fill", crft.ui.x, crft.ui.y, crft.ui.w, crft.ui.h, 5, 5)
|
|
|
love.graphics.setColor(colorWhite)
|
|
love.graphics.setColor(colorWhite)
|
|
|
love.graphics.print(crft.amount .. crft.title, crft.ui.x+5, crft.ui.y+5, 0, 1, 1)
|
|
love.graphics.print(crft.amount .. crft.title, crft.ui.x+5, crft.ui.y+5, 0, 1, 1)
|
|
|
|
|
+ love.graphics.print(crft.cost, crft.ui.x+5, crft.ui.y+20, 0, 1, 1)
|
|
|
|
|
|
|
|
elseif crft.own then
|
|
elseif crft.own then
|
|
|
if crft.own and not crft.active then
|
|
if crft.own and not crft.active then
|