mirror of
https://github.com/Ukendio/jecs.git
synced 2026-03-18 00:44:32 +00:00
Consolidate PerfGraph
This commit is contained in:
parent
96dfde0d2e
commit
a0f6a9a632
3 changed files with 0 additions and 39 deletions
0
modules/perfgraph.py → modules/PerfGraph/perfgraph.py
Executable file → Normal file
0
modules/perfgraph.py → modules/PerfGraph/perfgraph.py
Executable file → Normal file
0
modules/svg.py → modules/PerfGraph/svg.py
Executable file → Normal file
0
modules/svg.py → modules/PerfGraph/svg.py
Executable file → Normal file
|
|
@ -1,39 +0,0 @@
|
|||
-- A simple way to safely type remote events without hassle
|
||||
|
||||
local ReplicatedStorage = require("@game/ReplicatedStorage")
|
||||
local jecs = require("@jecs")
|
||||
local ty = require("./")
|
||||
|
||||
type Remote<T...> = {
|
||||
FireClient: (Remote<T...>, Player, T...) -> (),
|
||||
FireAllClients: (Remote<T...>, T...) -> (),
|
||||
FireServer: (Remote<T...>, T...) -> (),
|
||||
OnServerEvent: RBXScriptSignal<(Player, T...)>,
|
||||
OnClientEvent: RBXScriptSignal<T...>
|
||||
}
|
||||
|
||||
local function stream_ensure(name)
|
||||
local remote = ReplicatedStorage:FindFirstChild(name)
|
||||
if not remote then
|
||||
remote = Instance.new("RemoteEvent")
|
||||
remote.Name = name
|
||||
remote.Parent = ReplicatedStorage
|
||||
end
|
||||
return remote
|
||||
end
|
||||
|
||||
local function datagram_ensure(name)
|
||||
local remote = ReplicatedStorage:FindFirstChild(name)
|
||||
if not remote then
|
||||
remote = Instance.new("UnreliableRemoteEvent")
|
||||
remote.Name = name
|
||||
remote.Parent = ReplicatedStorage
|
||||
end
|
||||
return remote
|
||||
end
|
||||
|
||||
|
||||
return {
|
||||
input = datagram_ensure("input") :: Remote<string>,
|
||||
replication = stream_ensure("replication") :: Remote<snapshot>
|
||||
}
|
||||
Loading…
Reference in a new issue