mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2026-02-04 07:46:49 +00:00
light switch work and new prompt system
This commit is contained in:
48
src/server/main/Map/LightSwitches.lua
Normal file
48
src/server/main/Map/LightSwitches.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
--!optimize 2
|
||||
--!native
|
||||
--!strict
|
||||
|
||||
local MapDir = script.Parent
|
||||
local MainDir = MapDir.Parent
|
||||
|
||||
local TagService = require(MainDir:WaitForChild("TagService"))
|
||||
|
||||
type LightCallback = (Player: Player) -> ()
|
||||
|
||||
type ClassConstructor = typeof(setmetatable({} :: Constructor_Return_Props, {} :: Impl_Constructor))
|
||||
type Impl_Constructor = {
|
||||
__index: Impl_Constructor,
|
||||
constructor: Constructor_Fun,
|
||||
--Class functions
|
||||
AddHook: (self: ClassConstructor, Callback: LightCallback) -> (),
|
||||
Enable: (self: ClassConstructor) -> (),
|
||||
Disable: (self: ClassConstructor) -> ()
|
||||
}
|
||||
|
||||
type Constructor_Fun = (LightSwitches: TagService.LightSwitchTree) -> ClassConstructor
|
||||
type Constructor_Return_Props = {
|
||||
LightSwitches: TagService.LightSwitchTree
|
||||
}
|
||||
|
||||
local Lights = {} :: Impl_Constructor
|
||||
Lights.__index = Lights
|
||||
|
||||
function Lights.constructor(LightSwitches)
|
||||
return setmetatable({
|
||||
LightSwitches = LightSwitches
|
||||
}, Lights)
|
||||
end
|
||||
|
||||
function Lights:AddHook(Callback)
|
||||
|
||||
end
|
||||
|
||||
function Lights:Enable()
|
||||
|
||||
end
|
||||
|
||||
function Lights:Disable()
|
||||
|
||||
end
|
||||
|
||||
return Lights
|
||||
Reference in New Issue
Block a user