(084340338) Add an aim timer before the weapon can be used. Fix a null reference exception.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:54:33 +03:00
parent a2e40ed3eb
commit e9664d3639
28 changed files with 495 additions and 419 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;