1
This commit is contained in:
@@ -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:
|
||||
{
|
||||
|
Reference in New Issue
Block a user