This commit is contained in:
CortexCore
2023-12-16 23:30:08 +08:00
parent 78216a3d47
commit 961ae8feb4
33 changed files with 369 additions and 148 deletions

View File

@@ -1,6 +1,7 @@
using System;
using BITFALL;
using BITKit.Entities;
using BITKit.Entities.Physics;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.InputSystem;
@@ -17,6 +18,9 @@ namespace BITKit
[Inject] private IHealth _health;
[Inject(true)] private IEntityOverride _override;
[Inject(true)]
private IEntityPhysics _physics;
#endregion
public override void OnStart()
@@ -114,6 +118,11 @@ namespace BITKit
{
case false:
isDead = true;
if (_physics is not null)
{
_physics.Velocity = agent.velocity;
}
agent.ResetPath();
break;
case true when isDead:
{