mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 08:25:20 +01:00
36 lines
814 B
C#
36 lines
814 B
C#
using BehaviorDesigner.Runtime.Tasks;
|
|
using MoleMole.Config;
|
|
|
|
namespace MoleMole
|
|
{
|
|
[TaskCategory("Group")]
|
|
public class IsLeaderDead : Conditional
|
|
{
|
|
public SharedEntity targetEntity;
|
|
|
|
public SharedGroupAttackType attackType;
|
|
|
|
public SharedGroupMoveType moveType;
|
|
|
|
public override void OnAwake()
|
|
{
|
|
base.OnAwake();
|
|
}
|
|
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
if (targetEntity.Value != null && targetEntity.Value.IsActive())
|
|
{
|
|
return TaskStatus.Failure;
|
|
}
|
|
if (attackType.Value != ConfigGroupAIMinionOld.AttackType.Free || moveType.Value != ConfigGroupAIMinionOld.MoveType.Free)
|
|
{
|
|
attackType.Value = ConfigGroupAIMinionOld.AttackType.Free;
|
|
moveType.Value = ConfigGroupAIMinionOld.MoveType.Free;
|
|
return TaskStatus.Success;
|
|
}
|
|
return TaskStatus.Failure;
|
|
}
|
|
}
|
|
}
|