2026-04-29 음식 모델 배치
This commit is contained in:
@@ -44,9 +44,6 @@ private void Consume()
|
||||
{
|
||||
_consumed = true;
|
||||
|
||||
if (PlayerHunger.Instance != null)
|
||||
PlayerHunger.Instance.Eat(_foodData.HungerRestoreAmount);
|
||||
|
||||
// 손에서 강제 해제 (잡혀있던 상태로 Destroy되면 XRI 경고)
|
||||
if (_grab != null && _grab.isSelected && _grab.interactionManager != null)
|
||||
_grab.interactionManager.CancelInteractableSelection((UnityEngine.XR.Interaction.Toolkit.Interactables.IXRSelectInteractable)_grab);
|
||||
|
||||
@@ -8,8 +8,6 @@ namespace VRShopping.Player
|
||||
// Complete XR Origin Set Up 루트에 부착 (PlayerWallet과 동일 위치).
|
||||
public class PlayerHunger : MonoBehaviour
|
||||
{
|
||||
public static PlayerHunger Instance { get; private set; }
|
||||
|
||||
[Header("Gauge")]
|
||||
[SerializeField, Min(0f)] private float _maxHunger = 100f;
|
||||
[SerializeField, Min(0f)] private float _initialHunger = 80f;
|
||||
@@ -33,8 +31,6 @@ public class PlayerHunger : MonoBehaviour
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance != null && Instance != this) { Destroy(this); return; }
|
||||
Instance = this;
|
||||
|
||||
Current = Mathf.Clamp(_initialHunger, 0f, _maxHunger);
|
||||
|
||||
@@ -44,7 +40,6 @@ private void Awake()
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (Instance == this) Instance = null;
|
||||
// 씬 종료 시 변경한 속도 복구
|
||||
RestoreMoveSpeed();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user