mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 06:41:55 +00:00
RelayAlgorithm .Sorted event
This commit is contained in:
@@ -18,6 +18,10 @@ type Constructor_Return_Props = {
|
|||||||
ElevatorAttributes: ElevatorAttributes,
|
ElevatorAttributes: ElevatorAttributes,
|
||||||
DoorAttributes: DoorAttributes,
|
DoorAttributes: DoorAttributes,
|
||||||
__FloorQueue: FloorQueue,
|
__FloorQueue: FloorQueue,
|
||||||
|
|
||||||
|
Events: {
|
||||||
|
Sorted: BindableEvent
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
type ElevatorAttributes = {
|
type ElevatorAttributes = {
|
||||||
@@ -51,6 +55,10 @@ function RelayAlgorithm.constructor(BoxAlignPosition, ElevatorAttributes, DoorAt
|
|||||||
ElevatorAttributes = ElevatorAttributes,
|
ElevatorAttributes = ElevatorAttributes,
|
||||||
DoorAttributes = DoorAttributes,
|
DoorAttributes = DoorAttributes,
|
||||||
__FloorQueue = {},
|
__FloorQueue = {},
|
||||||
|
|
||||||
|
Events = {
|
||||||
|
Sorted = Instance.new("BindableEvent") :: BindableEvent
|
||||||
|
},
|
||||||
}, RelayAlgorithm)
|
}, RelayAlgorithm)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -64,6 +72,7 @@ function RelayAlgorithm:Sort(ElevatorGoingUp)
|
|||||||
end
|
end
|
||||||
return a>b
|
return a>b
|
||||||
end)
|
end)
|
||||||
|
self.Events.Sorted:Fire()
|
||||||
end
|
end
|
||||||
|
|
||||||
function RelayAlgorithm:Check(ElevatorGoingUp)
|
function RelayAlgorithm:Check(ElevatorGoingUp)
|
||||||
|
|||||||
Reference in New Issue
Block a user