Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Dec 21, 2024
1 parent 057e45f commit 3076e61
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ local princess
local player

local vitality
local online

local key_states = {}
local bullet_pool = {}
Expand Down Expand Up @@ -85,6 +86,10 @@ function setup()
vitality.font = fontfactory:get("playful")
vitality:set("16+", 1350, 620)

online = overlay:create(WidgetType.label)
online.font = fontfactory:get("fixedsys")
online:set("Online 0", 1600, 15)

candle1 = entitymanager:spawn("candle")
candle1.placement:set(60, 100)
candle1.action:set("default")
Expand Down Expand Up @@ -143,6 +148,9 @@ function setup()
overlay:destroy(vitality)
vitality = nil

overlay:destroy(online)
online = nil

scenemanager:set("gameover")

collectgarbage("collect")
Expand Down Expand Up @@ -204,6 +212,10 @@ function setup()
table.insert(jet_pool, jet)
end

io:on("online", function(data)
online:set("Online " .. data.clients)
end)

scenemanager:set("ship")
end

Expand Down

0 comments on commit 3076e61

Please sign in to comment.