add player to state

This commit is contained in:
Reid 2023-07-25 01:59:21 -07:00
parent 8e79027911
commit 50fe652001
2 changed files with 3 additions and 0 deletions

View file

@ -7,7 +7,9 @@ import { InputKind } from "ReplicatedStorage/inputKind"
* The client ECS state.
*/
export class clientState {
[index: string]: unknown
character?: CharacterRigR6
player?: Player
debugEnabled = false
isRunning = false
lastProcessedCommand?: InputKind

View file

@ -11,6 +11,7 @@ const ClientState = new clientState()
const player = Players.LocalPlayer
ClientState.character = (player.Character || player.CharacterAdded.Wait()[0]) as CharacterRigR6
ClientState.player = player
setEnvironment(HOST)
start(HOST, ClientState)