updated rkit

This commit is contained in:
2025-10-21 15:25:59 +02:00
parent cbca728bc3
commit 98cf38ac00
4 changed files with 17 additions and 5 deletions

View File

@@ -15,7 +15,7 @@ MonoBehaviour:
m_DefaultGroup: 64326db70156abe409df70a80bc62dc5
m_currentHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
Hash: 7161750430d6352c24e2b9d942610a3e
m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 0
m_CatalogRequestsTimeout: 0

View File

@@ -2,5 +2,7 @@
public static class GameConsts {
public const string k_AddComponentMenu = "Jelycho/";
public const string k_CreateAssetMenu = "Jelycho/";
public const string k_FPPActionMapName = "FPP";
}
}

View File

@@ -1,9 +1,11 @@
using System;
using RebootKit.Engine.Extensions;
using RebootKit.Engine.Foundation;
using RebootKit.Engine.Input;
using RebootKit.Engine.Main;
using RebootKit.Engine.Network;
using RebootKit.Engine.Simulation;
using RebootReality.jelycho.Main;
using RebootReality.jelycho.Player.HUD;
using Unity.Mathematics;
using UnityEngine;
@@ -19,15 +21,23 @@ namespace RebootReality.jelycho.Player {
PlayerActor m_Actor;
PlayerHUD m_HUD;
IDisposable m_TargetInteractableLabelDisposable;
InputState m_InputState;
IDisposable m_TargetInteractableLabelDisposable;
IInteractable m_Interactable;
void Awake() {
m_HUD = Instantiate(m_Config.playerHUDPrefab);
m_InputState = RR.Input.NewInputState("Player Controller");
m_InputState.HideCursor = true;
m_InputState.LockCursor = true;
m_InputState.AddActiveMap(GameConsts.k_FPPActionMapName);
}
void OnDestroy() {
m_InputState?.Dispose();
m_InputState = null;
if (m_HUD != null) {
Destroy(m_HUD.gameObject);
m_HUD = null;
@@ -39,12 +49,12 @@ namespace RebootReality.jelycho.Player {
}
void OnEnable() {
RR.Input.LockCursor();
m_InputState.IsActive = true;
RR.Input.EnableControls();
}
void OnDisable() {
RR.Input.UnlockCursor();
m_InputState.IsActive = false;
RR.Input.DisableControls();
}