Haughton elevator and work on the buttons and new structure

This commit is contained in:
2024-08-20 16:29:06 -04:00
parent 7bae24c918
commit 8af537f9de
13 changed files with 419 additions and 259 deletions

View File

@@ -306,7 +306,7 @@ local function CabTraveling(self: ClassConstructor, deltaTime: number, LEVEL_VEC
if ElevatorPosition.Y>=LEVEL_VEC3_Y_WRAP.Y-self.Elevator.Configuration.FloorLevelingDistance then
if not Debounce.Leveling then
self.Events.__eventInstances__.Leveling:Fire()
SmoothVelocity(self, self.Elevator.Configuration.LevelingVelocity, .5)
SmoothVelocity(self, self.Elevator.Configuration.LevelingVelocity, 1)
Debounce.Leveling = true
end
@@ -338,7 +338,7 @@ local function CabTraveling(self: ClassConstructor, deltaTime: number, LEVEL_VEC
if ElevatorPosition.Y<=LEVEL_VEC3_Y_WRAP.Y+self.Elevator.Configuration.FloorLevelingDistance then
if not Debounce.Leveling then
self.Events.__eventInstances__.Leveling:Fire()
SmoothVelocity(self, self.Elevator.Configuration.LevelingVelocity, .5)
SmoothVelocity(self, self.Elevator.Configuration.LevelingVelocity, 1)
Debounce.Leveling = true
end
@@ -394,7 +394,7 @@ function Elevator:__TravelToFloorAsync(Level_Int, LEVEL_VEC3_Y_WRAP)
--Set the elevator's AlignPosition to the floor Y vector
self.Elevator.AlignPosition.Position = Vector3.new(self.Elevator.AlignPosition.Position.X, LEVEL_VEC3_Y_WRAP.Y, self.Elevator.AlignPosition.Position.Z)
--Set the elevator's velocity
SmoothVelocity(self, self.Elevator.Configuration.MaxVelocity, 10)
SmoothVelocity(self, self.Elevator.Configuration.MaxVelocity, 3)
end
function Elevator:RequestLevelAsync(RequestedLevel, Direction)