mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
Add debugger check
This commit is contained in:
parent
17415f27f3
commit
ff788a1235
5 changed files with 15 additions and 7 deletions
|
@ -3,9 +3,12 @@ local jecs = require(game:GetService("ReplicatedStorage").ecs)
|
|||
local world = require(script.world) :: jecs.World
|
||||
export type World = jecs.World
|
||||
|
||||
local Scheduler = require(script.scheduler)
|
||||
export type Scheduler = Scheduler.Scheduler
|
||||
|
||||
local std = {
|
||||
ChangeTracker = require(script.changetracker),
|
||||
Scheduler = require(script.scheduler),
|
||||
Scheduler = Scheduler,
|
||||
bt = require(script.bt),
|
||||
collect = require(script.collect),
|
||||
components = require(script.components),
|
||||
|
|
|
@ -12,10 +12,12 @@ local function start(modules)
|
|||
end
|
||||
local events = scheduler.collect.all()
|
||||
scheduler.systems.begin(events)
|
||||
|
||||
jabby.set_check_function(function(player)
|
||||
return true
|
||||
end)
|
||||
if RunService:IsClient() then
|
||||
local client = jabby.obtain_client()
|
||||
local player = game:GetService("Players").LocalPlayer
|
||||
local apps = player:WaitForChild("PlayerGui")
|
||||
local dtor
|
||||
UserInputService.InputBegan:Connect(function(input)
|
||||
if input.KeyCode == Enum.KeyCode.F4 then
|
||||
|
|
|
@ -12,7 +12,8 @@ local function move(dt: number)
|
|||
for _, transform, model in world:query(Transform, Model):iter() do
|
||||
local cf = transform.new
|
||||
if cf ~= transform.old then
|
||||
model.PrimaryPart.CFrame = cf
|
||||
local origo = model.PrimaryPart.CFrame
|
||||
model.PrimaryPart.CFrame = origo:Lerp(cf, 1)
|
||||
transform.old = cf
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,9 +5,11 @@ local ref = std.ref
|
|||
local world = std.world
|
||||
|
||||
local cts = std.components
|
||||
|
||||
local UpdateTransforms = ReplicatedStorage:WaitForChild("UpdateTransforms") :: RemoteEvent
|
||||
local collect = std.collect
|
||||
local stream = collect(UpdateTransforms.OnClientEvent)
|
||||
local function syncTransforms()
|
||||
for _, id, cf in blink.UpdateTransform.Iter() do
|
||||
for _, id, cf in stream do
|
||||
local e = ref("server-"..id)
|
||||
local transform = e:get(cts.Transform)
|
||||
if not transform then
|
||||
|
|
Loading…
Reference in a new issue