공용 npc 움직임 킄래스 수정
This commit is contained in:
parent
64773e80d8
commit
2ef865e11f
@ -7,6 +7,13 @@ public class RestaurantNpcMovement : RestaurantCharacterMovement, IAiMovement
|
||||
{
|
||||
private IAstarAI _iAstarAi;
|
||||
|
||||
private const int MaxRandomMoveAttempts = 1000;
|
||||
|
||||
public Vector3 CurrentPosition => _iAstarAi.position;
|
||||
public Vector3 Destination => _iAstarAi.destination;
|
||||
public float CurrentSpeed => _iAstarAi.velocity.magnitude;
|
||||
public bool IsMoving => !_iAstarAi.isStopped && _iAstarAi.hasPath;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
@ -14,13 +21,6 @@ protected override void Awake()
|
||||
_iAstarAi = GetComponent<IAstarAI>();
|
||||
Debug.Assert(_iAstarAi != null, "_iAstarAi is null");
|
||||
}
|
||||
|
||||
private const int MaxRandomMoveAttempts = 1000;
|
||||
|
||||
public Vector3 CurrentPosition => _iAstarAi.position;
|
||||
public Vector3 Destination => _iAstarAi.destination;
|
||||
public float CurrentSpeed => _iAstarAi.velocity.magnitude;
|
||||
public bool IsMoving => !_iAstarAi.isStopped && _iAstarAi.hasPath;
|
||||
|
||||
public void EnableMove()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user