mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-15 21:51:55 +00:00
Restructure and get a working state for the Haughton elevator
This commit is contained in:
@@ -22,7 +22,6 @@ type Scalar = {
|
||||
type GuiDependencies = {
|
||||
IntroGui: ScreenGui,
|
||||
Frame: Frame,
|
||||
FrameGradient: UIGradient,
|
||||
TextShadow: TextLabel,
|
||||
ShadowGradient: UIGradient,
|
||||
FrameworkText: TextLabel,
|
||||
@@ -45,7 +44,6 @@ local function GuiDependencies(IntroGui: ScreenGui): GuiDependencies
|
||||
|
||||
local Frame = IntroGui:WaitForChild("Frame") :: Frame
|
||||
|
||||
local FrameGradient = Frame:WaitForChild("UIGradient") :: UIGradient
|
||||
local TextShadow = Frame:WaitForChild("TextShadow") :: TextLabel
|
||||
local FrameworkText = Frame:WaitForChild("Framework") :: TextLabel
|
||||
local SandboxText = Frame:WaitForChild("Sandbox") :: TextLabel
|
||||
@@ -63,7 +61,6 @@ local function GuiDependencies(IntroGui: ScreenGui): GuiDependencies
|
||||
return {
|
||||
IntroGui = IntroGui,
|
||||
Frame = Frame,
|
||||
FrameGradient = FrameGradient,
|
||||
TextShadow = TextShadow,
|
||||
ShadowGradient = ShadowGradient,
|
||||
FrameworkText = FrameworkText,
|
||||
@@ -158,12 +155,12 @@ local function UI_3D_Rotation(Gui: GuiDependencies, Delta: number)
|
||||
local mX = Delta/1.5
|
||||
local mY = Delta/1.5
|
||||
local mZ = -7.65
|
||||
|
||||
|
||||
local RMatrix = RotationMatrix(mX,mY,mZ)
|
||||
local X = {Size*RMatrix.Ixx, Size*RMatrix.Ixy}
|
||||
local Y = {Size*RMatrix.Iyx, Size*RMatrix.Iyy}
|
||||
local Z = {Size*RMatrix.Izx, Size*RMatrix.Izy}
|
||||
|
||||
|
||||
local AXIS_R_3DScalar_X = Scalar(CenterX+X[1],CenterY+X[2],CenterX,CenterY)
|
||||
local AXIS_R_3DScalar_Y = Scalar(CenterX+Y[1],CenterY+Y[2],CenterX,CenterY)
|
||||
local AXIS_R_3DScalar_Z = Scalar(CenterX+Z[1],CenterY+Z[2],CenterX,CenterY)
|
||||
@@ -171,19 +168,19 @@ local function UI_3D_Rotation(Gui: GuiDependencies, Delta: number)
|
||||
Gui.Xframe.Position = UDim2.fromOffset(AXIS_R_3DScalar_X.Center.X, AXIS_R_3DScalar_X.Center.Y)
|
||||
Gui.Yframe.Position = UDim2.fromOffset(AXIS_R_3DScalar_Y.Center.X, AXIS_R_3DScalar_Y.Center.Y)
|
||||
Gui.Zframe.Position = UDim2.fromOffset(AXIS_R_3DScalar_Z.Center.X, AXIS_R_3DScalar_Z.Center.Y)
|
||||
|
||||
|
||||
Gui.Xframe_text.Position = UDim2.fromOffset(AXIS_R_3DScalar_X.Center.X, AXIS_R_3DScalar_X.Center.Y)
|
||||
Gui.Yframe_text.Position = UDim2.fromOffset(AXIS_R_3DScalar_Y.Center.X, AXIS_R_3DScalar_Y.Center.Y)
|
||||
Gui.Zframe_text.Position = UDim2.fromOffset(AXIS_R_3DScalar_Z.Center.X, AXIS_R_3DScalar_Z.Center.Y)
|
||||
|
||||
|
||||
Gui.Xframe.Size = UDim2.fromOffset(AXIS_R_3DScalar_X.Distance, WorldSize)
|
||||
Gui.Yframe.Size = UDim2.fromOffset(AXIS_R_3DScalar_Y.Distance, WorldSize)
|
||||
Gui.Zframe.Size = UDim2.fromOffset(AXIS_R_3DScalar_Z.Distance, WorldSize)
|
||||
|
||||
|
||||
Gui.Xframe.Rotation = AXIS_R_3DScalar_X.Rotation
|
||||
Gui.Yframe.Rotation = AXIS_R_3DScalar_Y.Rotation
|
||||
Gui.Zframe.Rotation = AXIS_R_3DScalar_Z.Rotation
|
||||
|
||||
|
||||
Gui.Xframe_text.Rotation = Gui.Xframe.Rotation
|
||||
Gui.Yframe_text.Rotation = Gui.Yframe.Rotation
|
||||
Gui.Zframe_text.Rotation = Gui.Zframe.Rotation
|
||||
@@ -206,4 +203,4 @@ return function(IntroGui: ScreenGui, load_elapse_start: number)
|
||||
|
||||
GUI_LoadFinish(Gui)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user