add custom hotbar
This commit is contained in:
parent
72029047a5
commit
8232eacff2
12 changed files with 304 additions and 8 deletions
|
@ -1,25 +1,31 @@
|
|||
import { CharacterRigR6 } from "@rbxts/character-promise"
|
||||
import Log, { Logger } from "@rbxts/log"
|
||||
import { Players } from "@rbxts/services"
|
||||
import { Players, StarterGui } from "@rbxts/services"
|
||||
import { start } from "ReplicatedStorage/ecs"
|
||||
import { clientState } from "ReplicatedStorage/ecs/state"
|
||||
import { Host } from "ReplicatedStorage/hosts"
|
||||
import { setEnvironment } from "ReplicatedStorage/idAttribute"
|
||||
import showGUI from "./showGUI"
|
||||
|
||||
const HOST = Host.Client
|
||||
|
||||
const clientLogger = Logger.configure()
|
||||
.WriteTo(Log.RobloxOutput())
|
||||
.Create()
|
||||
.WriteTo(Log.RobloxOutput())
|
||||
.Create()
|
||||
|
||||
const ClientState = new clientState(
|
||||
Players.LocalPlayer,
|
||||
(Players.LocalPlayer.Character || Players.LocalPlayer.CharacterAdded.Wait()[0]) as CharacterRigR6,
|
||||
false,
|
||||
false,
|
||||
Players.LocalPlayer.WaitForChild("Backpack") as Backpack,
|
||||
|
||||
clientLogger
|
||||
)
|
||||
|
||||
setEnvironment(HOST)
|
||||
start(HOST, ClientState)
|
||||
// no fuck off
|
||||
StarterGui.SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
|
||||
|
||||
const worldAndClientState = start(HOST, ClientState)
|
||||
showGUI(worldAndClientState[0], ClientState)
|
||||
setEnvironment(HOST)
|
Loading…
Add table
Add a link
Reference in a new issue