Polish arena effects, audio and diagnostics

This commit is contained in:
Leshyi committed 2026-11-30 01:26:42 +05:00
1 parent 2774e625c1
commit 16a359d4af
28 files changed
+512 -257

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
--!strict
local Config = require(game.ReplicatedStorage.Hunter.EffectsConfig)
local Diagnostics = {}
local stepping = false
local rays = 0
local events = 0
local window = 0
function Diagnostics.begin()
stepping = Config.Debug
rays = 0
end
function Diagnostics.raycast(origin: Vector3, direction: Vector3, geometry: RaycastParams): RaycastResult?
if stepping then rays += 1 end
return workspace:Raycast(origin, direction, geometry)
end
function Diagnostics.event()
if Config.Debug then events += 1 end
end
function Diagnostics.finish(state: Instance, fighters: number, now: number)
stepping = false
if not Config.Debug then return end
state:SetAttribute("DebugRays", rays)
state:SetAttribute("DebugFighters", fighters)
if now - window >= 1 then
state:SetAttribute("DebugEvents", events)
window, events = now, 0
end
end
return Diagnostics