(913cde46d) Refactor AIObjectiveUsing to use the TryAddSubObjective method. Reorganize a bit.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:50:04 +03:00
parent 5d7cc6599c
commit 566f1d16e4
12 changed files with 473 additions and 166 deletions
@@ -73,6 +73,21 @@ namespace Barotrauma
}
}
public override void Update(float deltaTime)
{
if (objectiveManager.CurrentObjective == this)
{
if (randomTimer > 0)
{
randomTimer -= deltaTime;
}
else
{
SetRandom();
}
}
}
public override bool IsCompleted() => false;
public override bool CanBeCompleted => true;