Actor support

This commit is contained in:
2024-02-21 13:23:23 -05:00
parent ff16d8ceb3
commit e5f1a546b1
21 changed files with 284 additions and 73 deletions

View File

@@ -2,17 +2,31 @@ local Floors = {}
Floors.__index = Floors
local Storage = game:GetService("ReplicatedStorage")
local CS = game:GetService("CollectionService")
local Tags = require(Storage:WaitForChild("Tags"))
function Floors.constructor(NumberOfFloors: number)
return setmetatable({NumberOfFloors = NumberOfFloors}, Floors)
function Floors.constructor(NumberOfFloors: number, Year: string)
local Floors = {}
for i: number = 1, NumberOfFloors do
local FloorTag_1 = CS:GetTagged(`ElevatorDoor_{Year}_Floor{tostring(i)}_1`)
local FloorTag_2 = CS:GetTagged(`ElevatorDoor_{Year}_Floor{tostring(i)}_2`)
if FloorTag_1 then
table.insert(Floors, FloorTag_1)
end
if FloorTag_2 then
table.insert(Floors, FloorTag_2)
end
end
return setmetatable({
NumberOfFloors = NumberOfFloors,
Floors = Floors
}, Floors)
end
--NumberOfFloors syntax: ElevatorDoor_(year)_Floor(floors amount)_1/2
function Floors:GetFloors(Year: string)
for i: number = 1, self.NumberOfFloors do
end
function Floors:GetFloor(Floor: number): Instance?
end
return Floors