v1.4.4.1 (Blood in the Water Update)
This commit is contained in:
@@ -30,6 +30,11 @@ namespace Barotrauma
|
||||
Noise
|
||||
}
|
||||
|
||||
[Serialize(0.0f, IsPropertySaveable.Yes), Editable]
|
||||
public float BlinkFrequency { get; private set; }
|
||||
|
||||
private float blinkTimer = 0.0f;
|
||||
|
||||
[Serialize("0,0", IsPropertySaveable.Yes), Editable]
|
||||
public Vector2 Offset { get; private set; }
|
||||
|
||||
@@ -242,7 +247,16 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
if (!spriteState.IsActive) { continue; }
|
||||
|
||||
if (decorativeSprite.BlinkFrequency > 0.0f)
|
||||
{
|
||||
decorativeSprite.blinkTimer += deltaTime * decorativeSprite.BlinkFrequency;
|
||||
decorativeSprite.blinkTimer %= 1.0f;
|
||||
if (decorativeSprite.blinkTimer > 0.5f)
|
||||
{
|
||||
spriteState.IsActive = false;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//check if the sprite should be animated
|
||||
bool animate = true;
|
||||
foreach (PropertyConditional conditional in decorativeSprite.AnimationConditionals)
|
||||
|
||||
@@ -240,7 +240,7 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.ThrowError($"Sprite \"{file}\" not found!");
|
||||
DebugConsole.ThrowError($"Sprite \"{file}\" not found!", contentPackage: contentPackage);
|
||||
DebugConsole.Log(Environment.StackTrace.CleanupStackTrace());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user