mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51:55 +00:00
Big client character refactor
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
type UDP = UnreliableRemoteEvent
|
||||
type CurrentCamera = Camera
|
||||
type CharacterShared = Folder
|
||||
|
||||
type ClassConstructor = typeof(setmetatable({} :: Constructor_Return_Props, {} :: Impl_Constructor))
|
||||
type Impl_Constructor = {
|
||||
@@ -14,7 +15,7 @@ type Impl_Constructor = {
|
||||
Disable: (self: ClassConstructor) -> ()
|
||||
} & Impl_Static_Props
|
||||
|
||||
type Constructor_Fun = (CurrentCamera: CurrentCamera) -> ClassConstructor
|
||||
type Constructor_Fun = (CharacterShared: CharacterShared, CurrentCamera: CurrentCamera) -> ClassConstructor
|
||||
type Impl_Static_Props = {
|
||||
Running: boolean
|
||||
}
|
||||
@@ -23,6 +24,8 @@ type Constructor_Return_Props = {
|
||||
CurrentCamera: CurrentCamera
|
||||
}
|
||||
|
||||
export type SpineConstructor = ClassConstructor
|
||||
|
||||
local Spine = {} :: Impl_Constructor
|
||||
Spine.__index = Spine
|
||||
|
||||
@@ -30,16 +33,14 @@ Spine.Running = false
|
||||
|
||||
local Storage = game:GetService("ReplicatedStorage")
|
||||
local Players = game:GetService("Players")
|
||||
local Player = Players.LocalPlayer
|
||||
|
||||
local Delta = require(Storage:WaitForChild("Delta"))
|
||||
|
||||
local Player = Players.LocalPlayer
|
||||
local CharacterShared = _G.include(script, "CharacterShared")
|
||||
|
||||
function Spine.constructor(CurrentCamera: CurrentCamera)
|
||||
function Spine.constructor(CharacterShared, CurrentCamera)
|
||||
return setmetatable({
|
||||
Remote = CharacterShared:WaitForChild("SpineStream"),
|
||||
CurrentCamera = CurrentCamera
|
||||
Remote = CharacterShared:WaitForChild("SpineStream") :: UDP,
|
||||
CurrentCamera = CurrentCamera :: CurrentCamera
|
||||
}, Spine)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user