jecs/demo/src/ServerScriptService/main.server.luau

22 lines
690 B
Text
Raw Normal View History

local ReplicatedStorage = game:GetService("ReplicatedStorage")
2025-04-28 21:40:03 +00:00
local ServerScriptService = game:GetService("ServerScriptService")
local jecs = require(ReplicatedStorage.ecs)
local schedule = require(ReplicatedStorage.schedule)
2024-08-29 13:45:49 +00:00
2025-04-28 21:40:03 +00:00
local SYSTEM = schedule.SYSTEM
local RUN = schedule.RUN
require(ReplicatedStorage.components)
2025-07-27 12:39:43 +00:00
local world = jecs.world()
2025-04-28 21:40:03 +00:00
local systems = ServerScriptService.systems
SYSTEM(world, systems.replication)
SYSTEM(world, systems.players_added)
SYSTEM(world, systems.poison_hurts)
2025-07-02 16:25:20 +00:00
SYSTEM(world, systems.health_regen)
SYSTEM(world, systems.lifetimes_expire)
2025-04-28 21:40:03 +00:00
SYSTEM(world, systems.life_is_painful)
2025-07-02 16:25:20 +00:00
SYSTEM(world, ReplicatedStorage.systems.entities_delete)
2025-04-28 21:40:03 +00:00
RUN(world, 0)