This commit is contained in:
CortexCore
2023-10-30 01:25:53 +08:00
parent add6d0cab3
commit 18f664a545
125 changed files with 3529 additions and 700 deletions

View File

@@ -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;

View File

@@ -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;