1
This commit is contained in:
@@ -6,7 +6,7 @@ using UnityEngine.InputSystem;
|
||||
|
||||
namespace BITKit
|
||||
{
|
||||
public class NavAgentMovement: StateBasedComponent<IEntityMovementState>,IEntityMovement
|
||||
public class NavAgentMovement: StateBasedBehavior<IEntityMovementState>,IEntityMovement
|
||||
{
|
||||
#region 属性
|
||||
[SerializeField] private NavMeshAgent agent;
|
||||
@@ -67,8 +67,8 @@ namespace BITKit
|
||||
GroundVelocity = _groundVelocity;
|
||||
IsGrounded = agent.isOnOffMeshLink is false;
|
||||
|
||||
entity.Set<bool>("IsMoving",Velocity.sqrMagnitude>=0.16f);
|
||||
entity.Set<float>("SqrMagnitude",Velocity.sqrMagnitude);
|
||||
UnityEntity.Set<bool>("IsMoving",Velocity.sqrMagnitude>=0.16f);
|
||||
UnityEntity.Set<float>("SqrMagnitude",Velocity.sqrMagnitude);
|
||||
|
||||
if (!isDead) return;
|
||||
|
||||
|
@@ -6,7 +6,7 @@ using UnityEngine.InputSystem;
|
||||
|
||||
namespace BITKit.Entities.Movement
|
||||
{
|
||||
public class RigidbodyBasedMovement : StateBasedComponent<IEntityMovementState>,IEntityMovement
|
||||
public class RigidbodyBasedMovement : StateBasedBehavior<IEntityMovementState>,IEntityMovement
|
||||
{
|
||||
[SerializeField] private new Rigidbody rigidbody;
|
||||
[SerializeField] private Animator animator;
|
||||
|
Reference in New Issue
Block a user