코드 리팩토링
재사용성 및 확장성을 고려하여 코드 전반을 리팩토링함
This commit is contained in:
@@ -33,11 +33,11 @@ public class PlayerActionHandler : NetworkBehaviour
|
||||
private IEnumerator InteractionRoutine(ActionDescriptor desc, IInteractable target)
|
||||
{
|
||||
_isBusy = true;
|
||||
if (desc != null) _animator.SetTrigger(desc.animTrigger);
|
||||
if (desc != null) _animator.SetTrigger(desc.AnimTrigger);
|
||||
|
||||
target.Interact(gameObject); // 로직 실행
|
||||
|
||||
yield return new WaitForSeconds(desc?.duration ?? 0.1f);
|
||||
yield return new WaitForSeconds(desc?.Duration ?? 0.1f);
|
||||
_isBusy = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user