2
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
695 B
C#

using System;
namespace CleverCrow.Fluid.BTs.Tasks {
public class ConditionGeneric : ConditionBase {
public Func<bool> updateLogic;
public Action startLogic;
public Action initLogic;
public Action exitLogic;
protected override bool OnUpdate () {
if (updateLogic != null) {
return updateLogic();
}
return true;
}
protected override void OnStart () {
startLogic?.Invoke();
}
protected override void OnExit () {
initLogic?.Invoke();
}
protected override void OnInit () {
exitLogic?.Invoke();
}
}
}