mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2026-02-04 03:56:50 +00:00
Spinning objects
This commit is contained in:
@@ -9,7 +9,8 @@ local RS: ReplicatedStorage = game:GetService("ReplicatedStorage")
|
||||
local TagsModule = require(RS:WaitForChild("Tags"))
|
||||
local Enums = require(Elevators:WaitForChild("Enums"))
|
||||
|
||||
type Tags = TagsModule.ExportedTags
|
||||
type TagsConstructor = TagsModule.TagsConstructor
|
||||
type TagProduct = TagsModule.TagProduct
|
||||
type HumanoidRootPart = BasePart
|
||||
type PromptCallback = (Player: Player) -> ()
|
||||
|
||||
@@ -30,9 +31,9 @@ type Impl_Static_Props = {
|
||||
ButtonEnum: any
|
||||
}
|
||||
|
||||
type Constructor_Fun = (Tags: Tags, Model: string) -> ClassConstructor
|
||||
type Constructor_Fun = (TagsConstructor: TagsConstructor, Model: string) -> ClassConstructor
|
||||
type Constructor_Return_Props = {
|
||||
Tags: Tags,
|
||||
Tags: TagsConstructor,
|
||||
Model: string,
|
||||
Buttons: ButtonsTree
|
||||
}
|
||||
@@ -53,9 +54,9 @@ export type ButtonsConstructor = ClassConstructor
|
||||
local ButtonsModule = {} :: Impl_Constructor
|
||||
ButtonsModule.__index = ButtonsModule
|
||||
|
||||
function ButtonsModule.constructor(Tags, Model)
|
||||
function ButtonsModule.constructor(TagsConstructor, Model)
|
||||
return setmetatable({
|
||||
Tags = Tags,
|
||||
Tags = TagsConstructor,
|
||||
Model = Model,
|
||||
Buttons = {
|
||||
Landing = {},
|
||||
@@ -76,7 +77,7 @@ end
|
||||
function ButtonsModule:Get()
|
||||
local Buttons: GetButtons = {}
|
||||
|
||||
for TagName: string, Inst: Instance | {Instance} in self.Tags do
|
||||
for TagName: string, Inst: TagProduct in self.Tags.__export do
|
||||
local Split = TagName:split('_')
|
||||
if Split[1] == self.Model and (Split[2] == "ElevatorButton" or Split[2] == "RelayButton") then
|
||||
if typeof(Inst) == "Instance" then
|
||||
|
||||
Reference in New Issue
Block a user