2026-03-28 인벤토리 90%
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
public class InventoryManager : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject _inventoryRoot;
|
||||
[SerializeField] private GameObject _inventoryContentRoot;
|
||||
[SerializeField] private GameObject _slotPrefab;
|
||||
|
||||
@@ -51,21 +50,6 @@ private void Start()
|
||||
{
|
||||
|
||||
}
|
||||
public void InventoryToggle()
|
||||
{
|
||||
if (_inventoryRoot != null)
|
||||
{
|
||||
InventoryOnOff(!_inventoryRoot.activeSelf);
|
||||
}
|
||||
}
|
||||
|
||||
public void InventoryOnOff(bool onOff)
|
||||
{
|
||||
if (_inventoryRoot != null)
|
||||
{
|
||||
_inventoryRoot.SetActive(onOff);
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateUI()
|
||||
{
|
||||
|
||||
@@ -95,6 +95,9 @@ public void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||
InputManager.Instance.SetUIInputMap("InGameUI");
|
||||
InputManager.Instance.SetCharacterInputMap("Character");
|
||||
|
||||
//일단 하나의 액션맵만 사용
|
||||
InputManager.Instance.ActiveOnlyOneActionMap("Character");
|
||||
|
||||
//카메라 줌 매핑
|
||||
InputManager.Instance.OnMouseScrollEvent += GameManager.Instance.Camera.ZoomCamera;
|
||||
|
||||
@@ -108,6 +111,9 @@ public void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||
//InputManager.Instance.OnNormalAttackEvent;
|
||||
//InputManager.Instance.OnHeavyAttackEvent;
|
||||
|
||||
//UI매핑
|
||||
InputManager.Instance.OnKeyDown_IKeyEvent += GameManager.Instance.InGameUI.InventoryToggle;
|
||||
|
||||
//화면 켜기
|
||||
}
|
||||
|
||||
@@ -141,9 +147,17 @@ private void OnDestroy()
|
||||
InputManager.Instance.OnMoveEvent -= CurrentCharacterController.MoveInput;
|
||||
InputManager.Instance.OnSprintEvent -= CurrentCharacterController.SprintInput;
|
||||
InputManager.Instance.OnJumpEvent -= CurrentCharacterController.JumpInput;
|
||||
InputManager.Instance.OnAimToggleEvent -= CurrentCharacterController.AimToggleInput;
|
||||
InputManager.Instance.OnLookEvent -= CurrentCharacterController.LookInput;
|
||||
InputManager.Instance.OnDodgeEvent -= CurrentCharacterController.DodgeInput;
|
||||
//InputManager.Instance.OnNormalAttackEvent;
|
||||
//InputManager.Instance.OnHeavyAttackEvent;
|
||||
}
|
||||
|
||||
if(GameManager.Instance != null)
|
||||
{
|
||||
InputManager.Instance.OnKeyDown_IKeyEvent -= GameManager.Instance.InGameUI.InventoryToggle;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user