mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-15 21:51:55 +00:00
more roact
This commit is contained in:
@@ -60,7 +60,8 @@ type Constructor_Return_Props = {
|
||||
PieplatePulley: UnionOperation,
|
||||
Audio_ChimeDirection: Sound,
|
||||
Audio_ChimeLanding: Sound,
|
||||
__MovingConnection: RBXScriptConnection?
|
||||
MachineRoom: MovingObjects.MachineRoom,
|
||||
__MovingConnection: RBXScriptConnection?,
|
||||
}
|
||||
|
||||
type ButtonFunction = () -> ()
|
||||
@@ -154,19 +155,16 @@ function Otis1960.constructor(TagsConstructor)
|
||||
self.PiePlateSelector = TagsConstructor:Request("Otis1960_PiePlateSelector") :: UnionOperation
|
||||
self.PiePlatePlates = TagsConstructor:Request("Otis1960_PiePlatePlates") :: UnionOperation
|
||||
|
||||
--Rotation objects
|
||||
self.Pulley = TagsConstructor:Request("Otis1960_Pulley") :: UnionOperation
|
||||
self.Pulley2 = TagsConstructor:Request("Otis1960_Pulley2") :: UnionOperation
|
||||
self.Governor = TagsConstructor:Request("Otis1960_Governor") :: UnionOperation
|
||||
self.GovernorFlyballs = TagsConstructor:Request("Otis1960_GovernorFlyballs") :: UnionOperation
|
||||
self.PieplatePulley = TagsConstructor:Request("Otis1960_PieplatePulley") :: UnionOperation
|
||||
--Rotation objects
|
||||
self.MachineRoom = {} :: MovingObjects.MachineRoom
|
||||
self.MachineRoom.Pulley = TagsConstructor:Request("Otis1960_Pulley") :: UnionOperation
|
||||
self.MachineRoom.Pulley2 = TagsConstructor:Request("Otis1960_Pulley2") :: UnionOperation
|
||||
self.MachineRoom.Governor = TagsConstructor:Request("Otis1960_Governor") :: UnionOperation
|
||||
self.MachineRoom.GovernorFlyballs = TagsConstructor:Request("Otis1960_GovernorFlyballs") :: UnionOperation
|
||||
self.MachineRoom.PieplatePulley = TagsConstructor:Request("Otis1960_PieplatePulley") :: UnionOperation
|
||||
|
||||
self.MOConstructor = MovingObjects.constructor({
|
||||
Pulley = self.Pulley,
|
||||
Pulley2 = self.Pulley2,
|
||||
Governor = self.Governor,
|
||||
GovernorFlyballs = self.GovernorFlyballs,
|
||||
PieplatePulley = self.PieplatePulley,
|
||||
MachineRoom = self.MachineRoom
|
||||
} :: MovingObjects.InstanceTree)
|
||||
|
||||
--Audio
|
||||
@@ -212,13 +210,10 @@ function Otis1960:_MoveFloors(Level)
|
||||
self.__MovingConnection = RS.Heartbeat:Connect(function(_dt) --Not safe for parallel
|
||||
RotationDelta+=1
|
||||
|
||||
local ElevatorPosition = self.ElevatorBox_1960.Position
|
||||
local ElevatorVelocity = self.ElevatorBox_1960:GetVelocityAtPosition(ElevatorPosition).Y
|
||||
local ElevatorPosition: Vector3 = self.ElevatorBox_1960.Position
|
||||
local ElevatorVelocityY: number = self.ElevatorBox_1960:GetVelocityAtPosition(ElevatorPosition).Y
|
||||
|
||||
--local VelocitySmoothing = Easings.Linear(LastVelocityDelta, ElevatorVelocity, .5)
|
||||
--LastVelocityDelta = ElevatorVelocity
|
||||
|
||||
|
||||
self.MOConstructor:Frame_Pullies(RotationDelta, ElevatorVelocityY)
|
||||
self.TractionRopes:Move(26.3, ElevatorPosition)
|
||||
|
||||
if ElevatorPosition.Y>=self.BoxAlignPosition.Position.Y then
|
||||
|
||||
Reference in New Issue
Block a user