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

@@ -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)

View File

@@ -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()

View File

@@ -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