공용 npc 움직임 킄래스 수정
This commit is contained in:
parent
64773e80d8
commit
2ef865e11f
@ -7,6 +7,13 @@ public class RestaurantNpcMovement : RestaurantCharacterMovement, IAiMovement
|
|||||||
{
|
{
|
||||||
private IAstarAI _iAstarAi;
|
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()
|
protected override void Awake()
|
||||||
{
|
{
|
||||||
base.Awake();
|
base.Awake();
|
||||||
@ -15,13 +22,6 @@ protected override void Awake()
|
|||||||
Debug.Assert(_iAstarAi != null, "_iAstarAi is null");
|
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()
|
public void EnableMove()
|
||||||
{
|
{
|
||||||
_iAstarAi.canMove = true;
|
_iAstarAi.canMove = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user