updated rkit
This commit is contained in:
@@ -15,7 +15,7 @@ MonoBehaviour:
|
|||||||
m_DefaultGroup: 64326db70156abe409df70a80bc62dc5
|
m_DefaultGroup: 64326db70156abe409df70a80bc62dc5
|
||||||
m_currentHash:
|
m_currentHash:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
Hash: 00000000000000000000000000000000
|
Hash: 7161750430d6352c24e2b9d942610a3e
|
||||||
m_OptimizeCatalogSize: 0
|
m_OptimizeCatalogSize: 0
|
||||||
m_BuildRemoteCatalog: 0
|
m_BuildRemoteCatalog: 0
|
||||||
m_CatalogRequestsTimeout: 0
|
m_CatalogRequestsTimeout: 0
|
||||||
|
|||||||
Submodule Assets/RebootKit updated: 00b33af98b...40e2236f12
@@ -2,5 +2,7 @@
|
|||||||
public static class GameConsts {
|
public static class GameConsts {
|
||||||
public const string k_AddComponentMenu = "Jelycho/";
|
public const string k_AddComponentMenu = "Jelycho/";
|
||||||
public const string k_CreateAssetMenu = "Jelycho/";
|
public const string k_CreateAssetMenu = "Jelycho/";
|
||||||
|
|
||||||
|
public const string k_FPPActionMapName = "FPP";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using RebootKit.Engine.Extensions;
|
using RebootKit.Engine.Extensions;
|
||||||
using RebootKit.Engine.Foundation;
|
using RebootKit.Engine.Foundation;
|
||||||
|
using RebootKit.Engine.Input;
|
||||||
using RebootKit.Engine.Main;
|
using RebootKit.Engine.Main;
|
||||||
using RebootKit.Engine.Network;
|
using RebootKit.Engine.Network;
|
||||||
using RebootKit.Engine.Simulation;
|
using RebootKit.Engine.Simulation;
|
||||||
|
using RebootReality.jelycho.Main;
|
||||||
using RebootReality.jelycho.Player.HUD;
|
using RebootReality.jelycho.Player.HUD;
|
||||||
using Unity.Mathematics;
|
using Unity.Mathematics;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@@ -18,16 +20,24 @@ namespace RebootReality.jelycho.Player {
|
|||||||
|
|
||||||
PlayerActor m_Actor;
|
PlayerActor m_Actor;
|
||||||
PlayerHUD m_HUD;
|
PlayerHUD m_HUD;
|
||||||
|
|
||||||
|
InputState m_InputState;
|
||||||
|
|
||||||
IDisposable m_TargetInteractableLabelDisposable;
|
IDisposable m_TargetInteractableLabelDisposable;
|
||||||
|
|
||||||
IInteractable m_Interactable;
|
IInteractable m_Interactable;
|
||||||
|
|
||||||
void Awake() {
|
void Awake() {
|
||||||
m_HUD = Instantiate(m_Config.playerHUDPrefab);
|
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() {
|
void OnDestroy() {
|
||||||
|
m_InputState?.Dispose();
|
||||||
|
m_InputState = null;
|
||||||
|
|
||||||
if (m_HUD != null) {
|
if (m_HUD != null) {
|
||||||
Destroy(m_HUD.gameObject);
|
Destroy(m_HUD.gameObject);
|
||||||
m_HUD = null;
|
m_HUD = null;
|
||||||
@@ -39,12 +49,12 @@ namespace RebootReality.jelycho.Player {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OnEnable() {
|
void OnEnable() {
|
||||||
RR.Input.LockCursor();
|
m_InputState.IsActive = true;
|
||||||
RR.Input.EnableControls();
|
RR.Input.EnableControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnDisable() {
|
void OnDisable() {
|
||||||
RR.Input.UnlockCursor();
|
m_InputState.IsActive = false;
|
||||||
RR.Input.DisableControls();
|
RR.Input.DisableControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user