From a2e21a78f913ce87052087dc98ece50f2827bbb4 Mon Sep 17 00:00:00 2001 From: Regalis Date: Thu, 6 Apr 2017 21:58:35 +0300 Subject: [PATCH] Nicer looking explosions --- .../Content/Particles/ParticlePrefabs.xml | 13 ++++---- Subsurface/Source/Map/Explosion.cs | 30 ++++++++++++++----- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/Subsurface/Content/Particles/ParticlePrefabs.xml b/Subsurface/Content/Particles/ParticlePrefabs.xml index 36fbedd31..da68c848f 100644 --- a/Subsurface/Content/Particles/ParticlePrefabs.xml +++ b/Subsurface/Content/Particles/ParticlePrefabs.xml @@ -159,18 +159,21 @@ - + velocitychange="0.0, 1.0" + animduration="1.2" + loopanim="false"> + DimLight(LightSource light) { - float currBrightness= 1.0f; + float currBrightness = 1.0f; float startRange = light.Range; while (light.Color.A > 0.0f) @@ -101,13 +117,13 @@ namespace Barotrauma light.Color = new Color(light.Color.R, light.Color.G, light.Color.B, currBrightness); light.Range = startRange * currBrightness; - currBrightness -= CoroutineManager.DeltaTime*10.0f; + currBrightness -= CoroutineManager.DeltaTime * 20.0f; yield return CoroutineStatus.Running; } light.Remove(); - + yield return CoroutineStatus.Success; }