mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51:55 +00:00
Actor support
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
--My versions
|
||||
|
||||
type EaseFunction = (n: number) -> number
|
||||
type LinearFunction = (a: number, b: number, t: number) -> number
|
||||
|
||||
export type EasingStyles = {
|
||||
Linear: EaseFunction,
|
||||
Linear: LinearFunction,
|
||||
InOutBack: EaseFunction,
|
||||
OutBounce: EaseFunction
|
||||
}
|
||||
|
||||
local Ease: EasingStyles = {}
|
||||
local Ease = {} :: EasingStyles
|
||||
--Google straight up gives wrong/bad math
|
||||
|
||||
function Ease.Linear(a,b,t)
|
||||
|
||||
@@ -15,14 +15,14 @@ export type InputEnded = RBXScriptConnection
|
||||
|
||||
type CallbackFunction = () -> ()
|
||||
|
||||
function BindLink.constructor() --Allow multiple bindings of the same keys, no overwrites
|
||||
function BindLink.constructor(gameProcessing: boolean) --Allow multiple bindings of the same keys, no overwrites
|
||||
type BindConstructor = {
|
||||
BindMap: KeyBindMap,
|
||||
InputBegan: InputBegan,
|
||||
InputEnded: InputEnded
|
||||
}
|
||||
|
||||
local self: BindConstructor = {}
|
||||
local self = {} :: BindConstructor
|
||||
self.BindMap = {
|
||||
Began = {},
|
||||
Ended = {}
|
||||
@@ -30,7 +30,7 @@ function BindLink.constructor() --Allow multiple bindings of the same keys, no o
|
||||
|
||||
--Return these for convenience
|
||||
self.InputBegan = UIS.InputBegan:Connect(function(input, gameProcessedEvent)
|
||||
if not gameProcessedEvent then
|
||||
if gameProcessing and gameProcessedEvent or not gameProcessedEvent then
|
||||
local switch = self.BindMap.Began[input.KeyCode]
|
||||
if switch then
|
||||
switch()
|
||||
@@ -40,7 +40,7 @@ function BindLink.constructor() --Allow multiple bindings of the same keys, no o
|
||||
end
|
||||
end)
|
||||
self.InputEnded = UIS.InputEnded:Connect(function(input, gameProcessedEvent)
|
||||
if not gameProcessedEvent then
|
||||
if gameProcessing and gameProcessedEvent or not gameProcessedEvent then
|
||||
local switch = self.BindMap.Ended[input.KeyCode]
|
||||
if switch then
|
||||
switch()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local CS = game:GetService("CollectionService")
|
||||
|
||||
local exports: {[string]: BasePart} = {}
|
||||
local exports: {[string]: Instance} = {}
|
||||
|
||||
local AllTags = CS:GetAllTags()
|
||||
for i = 1, #AllTags do
|
||||
|
||||
Reference in New Issue
Block a user