mirror of
https://github.com/Ukendio/jecs.git
synced 2026-02-04 15:15:21 +00:00
21 lines
605 B
Text
Executable file
21 lines
605 B
Text
Executable file
local ReplicatedStorage = game:GetService("ReplicatedStorage")
|
|
local ServerScriptService = game:GetService("ServerScriptService")
|
|
local jecs = require(ReplicatedStorage.ecs)
|
|
local schedule = require(ReplicatedStorage.schedule)
|
|
|
|
require(ReplicatedStorage.components)
|
|
local world = jecs.world()
|
|
|
|
local systems = ServerScriptService.systems
|
|
|
|
local heartbeat = schedule(world,
|
|
systems.players_added,
|
|
systems.poison_hurts,
|
|
systems.health_regen,
|
|
systems.lifetimes_expire,
|
|
systems.life_is_painful,
|
|
systems.entities_delete,
|
|
systems.replication
|
|
)
|
|
|
|
game:GetService("RunService").Heartbeat:Connect(heartbeat)
|