업그레이드 데이터 입력 로직 및 기능 추가
캐릭터 스탯을 PlayerStats 컴포넌트에서 모아서 관리하도록 변경 코드에서도 마찬가지
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Northbound
|
||||
[Header("Interaction Settings")]
|
||||
public float interactionRange = 3f;
|
||||
public LayerMask interactableLayer = ~0;
|
||||
public float workPower = 10f;
|
||||
|
||||
|
||||
[Header("Detection")]
|
||||
public Transform rayOrigin;
|
||||
@@ -47,9 +47,10 @@ namespace Northbound
|
||||
private Coroutine _interactionTimeoutCoroutine;
|
||||
|
||||
private NetworkPlayerController _networkPlayerController;
|
||||
private PlayerStats _playerStats;
|
||||
|
||||
public bool IsInteracting => _isInteracting;
|
||||
public float WorkPower => workPower;
|
||||
public float WorkPower => _playerStats?.GetManpower() ?? 10f;
|
||||
public IInteractable CurrentUnavailableInteractable => _unavailableInteractable;
|
||||
|
||||
// 로컬 플레이어인지 확인
|
||||
@@ -60,6 +61,8 @@ namespace Northbound
|
||||
{
|
||||
_networkPlayerController = GetComponent<NetworkPlayerController>();
|
||||
_networkAnimator = GetComponent<NetworkAnimator>();
|
||||
_playerStats = GetComponent<PlayerStats>();
|
||||
|
||||
}
|
||||
|
||||
public override void OnNetworkSpawn()
|
||||
|
||||
Reference in New Issue
Block a user