기존 시스템 재사용 프로토타입 보존
This commit is contained in:
@@ -17,6 +17,10 @@ namespace Northbound
|
||||
[Header("Animation")]
|
||||
public bool playAnimations = true;
|
||||
|
||||
[Header("Secondary Action")]
|
||||
[Tooltip("우클릭으로 실행할 액션 이름. 비어 있으면 사용하지 않습니다.")]
|
||||
public string secondaryActionName = "";
|
||||
|
||||
private Dictionary<string, IAction> _actions = new Dictionary<string, IAction>();
|
||||
private Animator _animator;
|
||||
private NetworkAnimator _networkAnimator;
|
||||
@@ -103,6 +107,18 @@ namespace Northbound
|
||||
ExecuteAction("Attack");
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!_isInputInitialized || !IsLocalPlayer || string.IsNullOrEmpty(secondaryActionName)) return;
|
||||
if (Mouse.current != null && Mouse.current.rightButton.wasPressedThisFrame)
|
||||
{
|
||||
if (!UpgradeListPopup.IsOpen && (_networkPlayerController == null || !_networkPlayerController.IsDead()))
|
||||
{
|
||||
ExecuteAction(secondaryActionName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ExecuteAction(string actionName)
|
||||
{
|
||||
if (_actions.TryGetValue(actionName, out IAction action))
|
||||
|
||||
Reference in New Issue
Block a user