mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2026-02-04 02:26:49 +00:00
Remove recursive search for light source, add LightSources
This commit is contained in:
@@ -19,7 +19,7 @@ type Impl_Constructor = {
|
||||
__index: Impl_Constructor,
|
||||
constructor: Constructor_Fun,
|
||||
--Class functions
|
||||
Init: (self: ClassConstructor) -> (),
|
||||
Init: (self: ClassConstructor) -> ()
|
||||
} & Impl_Static_Props
|
||||
|
||||
type Impl_Static_Props = {
|
||||
@@ -63,6 +63,10 @@ local function ToggleSwitchLight(EnabledState: boolean, LightObject: BasePart, L
|
||||
end
|
||||
end
|
||||
|
||||
local function SwitchState()
|
||||
|
||||
end
|
||||
|
||||
local LightSwitchTween = TweenModule.constructor(TweenInfo.new(Lights.SwitchAnimationTime, Enum.EasingStyle.Linear))
|
||||
|
||||
local function SwitchAnimation(EnabledState: boolean, LightProperties: LightProperties)
|
||||
@@ -92,6 +96,14 @@ function Lights:Init()
|
||||
local EnabledState = false
|
||||
|
||||
if LightProperties.ColorDeactivated and LightProperties.ColorActivated and LightProperties.Prompt and LightProperties.Lights then
|
||||
if LightProperties.Enabled then
|
||||
LightProperties.Prompt.ActionText = "Toggle Off"
|
||||
|
||||
else
|
||||
LightProperties.Prompt.ActionText = "Toggle On"
|
||||
|
||||
end
|
||||
|
||||
Prompt:AddHookTriggered(function(_Player: Player)
|
||||
EnabledState = not EnabledState
|
||||
|
||||
|
||||
Reference in New Issue
Block a user