This commit is contained in:
CortexCore
2023-10-20 19:31:12 +08:00
parent 5cd094ed9a
commit a160813262
1878 changed files with 630581 additions and 4485 deletions

View File

@@ -7,19 +7,21 @@ using UnityEngine;
namespace BITKit
{
public class EntityBehaviourTree :EntityComponent, IHealthCallback,IEntityOverrideCallback
public class EntityBehaviourTree :EntityComponent,IEntityOverrideCallback
{
public BehaviourTreeOwner behaviourTree;
[SerializeField] private Blackboard blackboard;
private readonly ValidHandle _allow=new();
[Inject] private IHealth _health;
public override void OnAwake()
{
entity.RegisterCallback<IHealthCallback>(this);
entity.RegisterCallback<IEntityOverrideCallback>(this);
_allow.AddListener(OnAllow);
_health.OnSetAlive += OnSetAlive;
_health.OnSetHealthPoint += OnSetHP;
}
public void OnSetAlive(bool alive)