feat: 젬 분류 사양과 장착 UI 반영
- 옵시디언 기준의 역할/발동 타입 분류를 스킬·젬 데이터와 장착 검증 로직에 반영 - 젬 보관 UI와 퀵슬롯 표시를 새 분류 및 실제 마나/쿨타임 계산 기준으로 갱신 - 테스트 스킬/젬 자산을 에디터 메뉴로 동기화하고 Unity 컴파일 및 플레이 검증 완료
This commit is contained in:
@@ -32,6 +32,7 @@ namespace Colosseum.Player
|
||||
private Vector3 velocity;
|
||||
private Vector2 moveInput; // 로컬 원시 입력 (IsOwner 전용)
|
||||
private InputSystem_Actions inputActions;
|
||||
private bool gameplayInputEnabled = true;
|
||||
private bool isJumping;
|
||||
private bool wasGrounded;
|
||||
private Vector3 forcedMovementVelocity;
|
||||
@@ -97,10 +98,10 @@ namespace Colosseum.Player
|
||||
private void InitializeInputActions()
|
||||
{
|
||||
inputActions = new InputSystem_Actions();
|
||||
inputActions.Player.Enable();
|
||||
inputActions.Player.Move.performed += OnMovePerformed;
|
||||
inputActions.Player.Move.canceled += OnMoveCanceled;
|
||||
inputActions.Player.Jump.performed += OnJumpPerformed;
|
||||
SetGameplayInputEnabled(true);
|
||||
}
|
||||
|
||||
private void CleanupInputActions()
|
||||
@@ -125,10 +126,7 @@ namespace Colosseum.Player
|
||||
{
|
||||
if (IsOwner && inputActions != null)
|
||||
{
|
||||
inputActions.Player.Enable();
|
||||
inputActions.Player.Move.performed += OnMovePerformed;
|
||||
inputActions.Player.Move.canceled += OnMoveCanceled;
|
||||
inputActions.Player.Jump.performed += OnJumpPerformed;
|
||||
SetGameplayInputEnabled(gameplayInputEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,9 +151,33 @@ namespace Colosseum.Player
|
||||
private void OnMovePerformed(InputAction.CallbackContext context) => moveInput = context.ReadValue<Vector2>();
|
||||
private void OnMoveCanceled(InputAction.CallbackContext context) => moveInput = Vector2.zero;
|
||||
|
||||
/// <summary>
|
||||
/// 로컬 플레이어의 전투 입력을 일시적으로 차단하거나 복구합니다.
|
||||
/// </summary>
|
||||
public void SetGameplayInputEnabled(bool enabled)
|
||||
{
|
||||
gameplayInputEnabled = enabled;
|
||||
|
||||
if (!IsOwner || inputActions == null)
|
||||
return;
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
inputActions.Player.Enable();
|
||||
return;
|
||||
}
|
||||
|
||||
moveInput = Vector2.zero;
|
||||
if (netMoveInput.Value != Vector2.zero)
|
||||
netMoveInput.Value = Vector2.zero;
|
||||
|
||||
inputActions.Player.Disable();
|
||||
}
|
||||
|
||||
private void OnJumpPerformed(InputAction.CallbackContext context)
|
||||
{
|
||||
if (!IsOwner) return;
|
||||
if (!gameplayInputEnabled) return;
|
||||
if (actionState != null && !actionState.CanJump) return;
|
||||
|
||||
JumpRequestRpc();
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Colosseum.Player
|
||||
[SerializeField] private PlayerActionState actionState;
|
||||
|
||||
private InputSystem_Actions inputActions;
|
||||
private bool gameplayInputEnabled = true;
|
||||
|
||||
public SkillData[] SkillSlots => skillSlots;
|
||||
public SkillLoadoutEntry[] SkillLoadoutEntries => skillLoadoutEntries;
|
||||
@@ -117,7 +118,7 @@ namespace Colosseum.Player
|
||||
inputActions.Player.Evade.performed += OnEvadePerformed;
|
||||
}
|
||||
|
||||
inputActions.Player.Enable();
|
||||
SetGameplayInputEnabled(true);
|
||||
}
|
||||
|
||||
public override void OnNetworkDespawn()
|
||||
@@ -148,10 +149,29 @@ namespace Colosseum.Player
|
||||
{
|
||||
if (IsOwner && inputActions != null)
|
||||
{
|
||||
inputActions.Player.Enable();
|
||||
SetGameplayInputEnabled(gameplayInputEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 로컬 플레이어의 스킬 입력을 일시적으로 차단하거나 복구합니다.
|
||||
/// </summary>
|
||||
public void SetGameplayInputEnabled(bool enabled)
|
||||
{
|
||||
gameplayInputEnabled = enabled;
|
||||
|
||||
if (!IsOwner || inputActions == null)
|
||||
return;
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
inputActions.Player.Enable();
|
||||
return;
|
||||
}
|
||||
|
||||
inputActions.Player.Disable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 기존 프리팹이나 씬 직렬화 데이터가 6칸으로 남아 있어도
|
||||
/// 긴급 회피 슬롯까지 포함한 7칸 구성을 항상 보장합니다.
|
||||
@@ -244,6 +264,9 @@ namespace Colosseum.Player
|
||||
/// </summary>
|
||||
private void OnSkillInput(int slotIndex)
|
||||
{
|
||||
if (!gameplayInputEnabled)
|
||||
return;
|
||||
|
||||
if (slotIndex < 0 || slotIndex >= skillSlots.Length)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user