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
|
local world = require(script.world) :: jecs.World
|
||||||
export type World = jecs.World
|
export type World = jecs.World
|
||||||
|
|
||||||
|
local Scheduler = require(script.scheduler)
|
||||||
|
export type Scheduler = Scheduler.Scheduler
|
||||||
|
|
||||||
local std = {
|
local std = {
|
||||||
ChangeTracker = require(script.changetracker),
|
ChangeTracker = require(script.changetracker),
|
||||||
Scheduler = require(script.scheduler),
|
Scheduler = Scheduler,
|
||||||
bt = require(script.bt),
|
bt = require(script.bt),
|
||||||
collect = require(script.collect),
|
collect = require(script.collect),
|
||||||
components = require(script.components),
|
components = require(script.components),
|
||||||
|
|
|
@ -204,7 +204,7 @@ do
|
||||||
world = world,
|
world = world,
|
||||||
debug = Name,
|
debug = Name,
|
||||||
entities = {}
|
entities = {}
|
||||||
} )
|
})
|
||||||
|
|
||||||
|
|
||||||
jabby.public.updated = true
|
jabby.public.updated = true
|
||||||
|
|
|
@ -12,10 +12,12 @@ local function start(modules)
|
||||||
end
|
end
|
||||||
local events = scheduler.collect.all()
|
local events = scheduler.collect.all()
|
||||||
scheduler.systems.begin(events)
|
scheduler.systems.begin(events)
|
||||||
|
|
||||||
|
jabby.set_check_function(function(player)
|
||||||
|
return true
|
||||||
|
end)
|
||||||
if RunService:IsClient() then
|
if RunService:IsClient() then
|
||||||
local client = jabby.obtain_client()
|
local client = jabby.obtain_client()
|
||||||
local player = game:GetService("Players").LocalPlayer
|
|
||||||
local apps = player:WaitForChild("PlayerGui")
|
|
||||||
local dtor
|
local dtor
|
||||||
UserInputService.InputBegan:Connect(function(input)
|
UserInputService.InputBegan:Connect(function(input)
|
||||||
if input.KeyCode == Enum.KeyCode.F4 then
|
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
|
for _, transform, model in world:query(Transform, Model):iter() do
|
||||||
local cf = transform.new
|
local cf = transform.new
|
||||||
if cf ~= transform.old then
|
if cf ~= transform.old then
|
||||||
model.PrimaryPart.CFrame = cf
|
local origo = model.PrimaryPart.CFrame
|
||||||
|
model.PrimaryPart.CFrame = origo:Lerp(cf, 1)
|
||||||
transform.old = cf
|
transform.old = cf
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,9 +5,11 @@ local ref = std.ref
|
||||||
local world = std.world
|
local world = std.world
|
||||||
|
|
||||||
local cts = std.components
|
local cts = std.components
|
||||||
|
local UpdateTransforms = ReplicatedStorage:WaitForChild("UpdateTransforms") :: RemoteEvent
|
||||||
|
local collect = std.collect
|
||||||
|
local stream = collect(UpdateTransforms.OnClientEvent)
|
||||||
local function syncTransforms()
|
local function syncTransforms()
|
||||||
for _, id, cf in blink.UpdateTransform.Iter() do
|
for _, id, cf in stream do
|
||||||
local e = ref("server-"..id)
|
local e = ref("server-"..id)
|
||||||
local transform = e:get(cts.Transform)
|
local transform = e:get(cts.Transform)
|
||||||
if not transform then
|
if not transform then
|
||||||
|
|
Loading…
Reference in a new issue