Progress + prettier ice walls

This commit is contained in:
Regalis
2015-12-12 13:44:05 +02:00
parent 78bccca4af
commit 17e8a2171f
49 changed files with 479 additions and 273 deletions
+9 -9
View File
@@ -103,7 +103,7 @@ namespace Barotrauma
if (volume <= 0.0f) return -1;
alSourceId = SoundManager.Play(this, relativePos, volume);
alSourceId = SoundManager.Play(this, relativePos/100.0f, volume);
return alSourceId;
@@ -112,16 +112,16 @@ namespace Barotrauma
//return UpdatePosition(newIndex, position, range, volume);
}
public int Play(float volume, float range, Body body)
{
//Vector2 bodyPosition = ConvertUnits.ToDisplayUnits(body.Position);
//bodyPosition.Y = -bodyPosition.Y;
//public int Play(float volume, float range, Body body)
//{
// //Vector2 bodyPosition = ConvertUnits.ToDisplayUnits(body.Position);
// //bodyPosition.Y = -bodyPosition.Y;
alSourceId = Play(volume, range, ConvertUnits.ToDisplayUnits(body.Position));
// alSourceId = Play(volume, range, ConvertUnits.ToDisplayUnits(body.Position));
return alSourceId;
}
// return alSourceId;
//}
private float GetVolume(Vector2 relativePosition, float range, float baseVolume)
{
@@ -198,7 +198,7 @@ namespace Barotrauma
return sourceIndex;
}
return SoundManager.Loop(this, sourceIndex, relativePos, volume);
return SoundManager.Loop(this, sourceIndex, relativePos/100.0f, volume);
}
+2 -4
View File
@@ -76,10 +76,8 @@ namespace Barotrauma
startDrone = Sound.Load("Content/Sounds/startDrone.ogg", false);
startDrone.Play();
yield return CoroutineStatus.Running;
waterAmbiences[0] = Sound.Load("Content/Sounds/Water/WaterAmbience1.ogg", false);
yield return CoroutineStatus.Running;
waterAmbiences[1] = Sound.Load("Content/Sounds/Water/WaterAmbience2.ogg", false);
@@ -276,9 +274,9 @@ namespace Barotrauma
}
}
public static void PlayDamageSound(DamageSoundType damageType, float damage, Body body)
public static void PlayDamageSound(DamageSoundType damageType, float damage, PhysicsBody body)
{
Vector2 bodyPosition = ConvertUnits.ToDisplayUnits(body.Position);
Vector2 bodyPosition = body.DrawPosition;
bodyPosition.Y = -bodyPosition.Y;
PlayDamageSound(damageType, damage, bodyPosition);