fix stuff, add percentage bar
This commit is contained in:
parent
c4c0dc879e
commit
f9403100de
4 changed files with 71 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
import { CharacterRigR6 } from "@rbxts/character-promise"
|
||||
import Log, { Logger } from "@rbxts/log"
|
||||
import { Players, StarterGui } from "@rbxts/services"
|
||||
import { Players } from "@rbxts/services"
|
||||
import { start } from "ReplicatedStorage/ecs"
|
||||
import { clientState } from "ReplicatedStorage/ecs/state"
|
||||
import { Host } from "ReplicatedStorage/hosts"
|
||||
|
@ -23,9 +23,6 @@ const ClientState = new clientState(
|
|||
clientLogger
|
||||
)
|
||||
|
||||
// no fuck off
|
||||
StarterGui.SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
|
||||
|
||||
const worldAndClientState = start(HOST, ClientState)
|
||||
showGUI(worldAndClientState[0], ClientState)
|
||||
setEnvironment(HOST)
|
|
@ -3,12 +3,16 @@ import Hooks from "@rbxts/roact-hooks"
|
|||
import Slot from "./slot"
|
||||
import { useWorldContext } from "../contexts/worldContext"
|
||||
import Padding from "ReplicatedStorage/ui/padding"
|
||||
import { StarterGui } from "@rbxts/services"
|
||||
|
||||
interface hotbarProps extends Roact.JsxInstanceProperties<Frame> {
|
||||
Event?: Roact.JsxInstanceEvents<Frame>
|
||||
Change?: Roact.JsxInstanceChangeEvents<Frame>
|
||||
}
|
||||
|
||||
// no fuck off
|
||||
StarterGui.SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
|
||||
|
||||
const hotbar: Hooks.FC<hotbarProps> = (props, hooks) => {
|
||||
const spreadableProps = { ...props } as Partial<hotbarProps>
|
||||
|
||||
|
|
|
@ -24,13 +24,13 @@ const slot: Hooks.FC<slotProps> = (props, hooks) => {
|
|||
|
||||
const { clientState } = useWorldContext(hooks)
|
||||
|
||||
const handleActivated = (): void => {
|
||||
const handleActivated = (): void => {
|
||||
tool.Parent !== clientState.character
|
||||
? clientState.character.Humanoid.EquipTool(tool)
|
||||
: clientState.character.Humanoid.UnequipTools()
|
||||
}
|
||||
|
||||
// maybe opt this into our system for inputs?
|
||||
// TODO: maybe opt this into our system for inputs?
|
||||
useEffect(() => {
|
||||
const guid = HttpService.GenerateGUID(false)
|
||||
ContextActionService.BindAction(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue