Browse Source

fix extra

master
Nicholas Hayashi 3 years ago
parent
commit
cd234dbc48
  1. 2
      src/extra.lua
  2. 5
      src/game.lua

2
src/extra.lua

@ -3,7 +3,7 @@ function fprofile(f, ...)
local t1 = am.current_time() local t1 = am.current_time()
local result = { f(...) } local result = { f(...) }
log("%f", am.current_time() - t1) log("%f", am.current_time() - t1)
return result
return unpack(result)
end end
function math.wrapf(float, range) function math.wrapf(float, range)

5
src/game.lua

@ -3,6 +3,7 @@ game = false -- flag to tell if there is a game running
state = {} state = {}
-- top right display types -- top right display types
-- f1 toggles what is displayed in the top right of the screen
local TRDTS = { local TRDTS = {
NOTHING = 0, NOTHING = 0,
CENTERED_EVENQ = 1, CENTERED_EVENQ = 1,
@ -95,7 +96,7 @@ end
local function do_day_night_cycle() local function do_day_night_cycle()
local tstep = (math.sin(state.time * am.delta_time) + 1) / 100 local tstep = (math.sin(state.time * am.delta_time) + 1) / 100
--state.world"negative_mask".color = vec4(tstep){a=1}
state.world"negative_mask".color = vec4(tstep){a=1}
end end
local function game_pause() local function game_pause()
@ -262,7 +263,7 @@ local function game_action(scene)
node.color = COLORS.CLARET node.color = COLORS.CLARET
node:action(am.tween(0.1, { color = COLORS.TRANSPARENT })) node:action(am.tween(0.1, { color = COLORS.TRANSPARENT }))
play_sfx(SOUNDS.BIRD2) play_sfx(SOUNDS.BIRD2)
alert("not enough $$$$")
alert("not enough money")
else else
update_money(-cost) update_money(-cost)

Loading…
Cancel
Save