2026-06-02 세팅오류, 죽을시 다시 시작

This commit is contained in:
nj
2026-06-02 11:56:50 +09:00
parent 2e7ddb5fb4
commit 2a1b1ff0dc
16 changed files with 117 additions and 117 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -119,6 +119,12 @@ public void EquipSlot(int slotIndex)
OnInventoryChanged?.Invoke();
}
public void ClearWeaponInven()
{
_weapons.Clear();
OnInventoryChanged?.Invoke();
}
// 디버그용: 슬롯에 해당 무기가 있는지 확인.
public bool HasWeaponInSlot(int slotIndex)
{

View File

@@ -1,77 +1,9 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.18.0
// from Assets/11_Input/GameInput.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
/// <summary>
/// Provides programmatic access to <see cref="InputActionAsset" />, <see cref="InputActionMap" />, <see cref="InputAction" /> and <see cref="InputControlScheme" /> instances defined in asset "Assets/11_Input/GameInput.inputactions".
/// </summary>
/// <remarks>
/// This class is source generated and any manual edits will be discarded if the associated asset is reimported or modified.
/// </remarks>
/// <example>
/// <code>
/// using namespace UnityEngine;
/// using UnityEngine.InputSystem;
///
/// // Example of using an InputActionMap named "Player" from a UnityEngine.MonoBehaviour implementing callback interface.
/// public class Example : MonoBehaviour, MyActions.IPlayerActions
/// {
/// private MyActions_Actions m_Actions; // Source code representation of asset.
/// private MyActions_Actions.PlayerActions m_Player; // Source code representation of action map.
///
/// void Awake()
/// {
/// m_Actions = new MyActions_Actions(); // Create asset object.
/// m_Player = m_Actions.Player; // Extract action map object.
/// m_Player.AddCallbacks(this); // Register callback interface IPlayerActions.
/// }
///
/// void OnDestroy()
/// {
/// m_Actions.Dispose(); // Destroy asset object.
/// }
///
/// void OnEnable()
/// {
/// m_Player.Enable(); // Enable all actions within map.
/// }
///
/// void OnDisable()
/// {
/// m_Player.Disable(); // Disable all actions within map.
/// }
///
/// #region Interface implementation of MyActions.IPlayerActions
///
/// // Invoked when "Move" action is either started, performed or canceled.
/// public void OnMove(InputAction.CallbackContext context)
/// {
/// Debug.Log($"OnMove: {context.ReadValue&lt;Vector2&gt;()}");
/// }
///
/// // Invoked when "Attack" action is either started, performed or canceled.
/// public void OnAttack(InputAction.CallbackContext context)
/// {
/// Debug.Log($"OnAttack: {context.ReadValue&lt;float&gt;()}");
/// }
///
/// #endregion
/// }
/// </code>
/// </example>
public partial class @GameInput: IInputActionCollection2, IDisposable
{
/// <summary>

View File

@@ -36,5 +36,7 @@ public void OnSceneLoaded()
public void GameRestart()
{
Debug.Log("다시시작");
SceneLoadManager.Instance.RequestSceneChange("GameScene");
}
}

View File

@@ -1758,7 +1758,6 @@ private void TickHitstun()
if (_hitstunTimer > 0f)
_hitstunTimer -= Time.fixedDeltaTime;
Debug.Log($"_hitstunTimer : {_hitstunTimer}, _isGrounded : {_isGrounded} ");
if (_hitstunTimer <= 0f && _isGrounded && !IsActionActive())
{
@@ -1774,7 +1773,6 @@ public void TakeDamage(int amount, Vector2 hitVelocity = default, string hitReac
if (_health == null || _health.IsDead) return;
_health.TakeDamage(amount);
Debug.Log($"{name} 피격: -{amount} (HP: {_health.CurrentHealth}/{_health.MaxHealth})");
if(_health.CurrentHealth <= 0)
{
@@ -1786,5 +1784,11 @@ public void PlayerDead()
{
//재시작 UI 띄우기
GameManager.Instance.Restart.ShowRestart();
PlayerWeaponInventory.Instance.ClearWeaponInven();
Destroy(gameObject);
}
}