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.
23 lines
576 B
C#
23 lines
576 B
C#
namespace CleverCrow.Fluid.BTs.Tasks.Actions {
|
|
public class Wait : ActionBase {
|
|
public int turns = 1;
|
|
|
|
private int _ticks;
|
|
|
|
public override string IconPath { get; } = $"{PACKAGE_ROOT}/HourglassFill.png";
|
|
|
|
protected override void OnStart () {
|
|
_ticks = 0;
|
|
}
|
|
|
|
protected override TaskStatus OnUpdate () {
|
|
if (_ticks < turns) {
|
|
_ticks++;
|
|
return TaskStatus.Continue;
|
|
}
|
|
|
|
return TaskStatus.Success;
|
|
}
|
|
}
|
|
}
|