jecs/demo/src/ReplicatedStorage/start.luau
Marcus ec4fa3ff3e
Add cached queries (#166)
* Initial commit

* Add tests

* Dedup observers

* Handle filters on table creation

* Handle Archetype deletion

* Remove print

* Fix type errors

* Cleanup code

* Manually inline code

* Build terms for cached queries

* Specialized cached query iterator

* Remove shadowed variable

* Inverse statement

* Rework demo

* Fix metatable

* Use generalized iteration
2024-12-26 06:15:41 +01:00

34 lines
992 B
Text

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local jabby = require(ReplicatedStorage.Packages.jabby)
local std = ReplicatedStorage.std
local scheduler = require(std.scheduler)
local world = require(std.world)
local function start(modules)
for _, module in modules do
require(module)
end
local events = scheduler.COLLECT()
scheduler.BEGIN(events)
jabby.set_check_function(function(player)
return true
end)
if RunService:IsClient() then
local player = game:GetService("Players").LocalPlayer
local playergui = player:WaitForChild("PlayerGui")
local client = jabby.obtain_client()
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.F4 then
local home = playergui:FindFirstChild("Home")
if home then
home:Destroy()
end
client.spawn_app(client.apps.home)
end
end)
end
end
return start