Settings menu with sound and music volume sliders, re-enabled deselecting connectionpanels with E in editmapscreen

This commit is contained in:
Regalis
2015-10-26 19:35:57 +02:00
parent ebe248a7cc
commit 9ed2963cd9
19 changed files with 223 additions and 72 deletions

View File

@@ -234,7 +234,7 @@ namespace Barotrauma
int index = (int)Math.Floor(flowForce.Length() / 100.0f);
index = Math.Min(index,2);
soundIndex = AmbientSoundManager.flowSounds[index].Loop(soundIndex, soundVolume, Position, 2000.0f);
soundIndex = SoundPlayer.flowSounds[index].Loop(soundIndex, soundVolume, Position, 2000.0f);
flowForce = Vector2.Zero;
lerpedFlowForce = Vector2.Lerp(lerpedFlowForce, flowForce, 0.05f);

View File

@@ -345,7 +345,7 @@ namespace Barotrauma
if (impact < 10.0f) return true;
AmbientSoundManager.PlayDamageSound(DamageSoundType.StructureBlunt, impact,
SoundPlayer.PlayDamageSound(DamageSoundType.StructureBlunt, impact,
new Vector2(
sections[section].rect.X + sections[section].rect.Width / 2,
sections[section].rect.Y - sections[section].rect.Height / 2));
@@ -436,7 +436,7 @@ namespace Barotrauma
if (playSound && !SectionHasHole(i))
{
DamageSoundType damageSoundType = (attack.DamageType == DamageType.Blunt) ? DamageSoundType.StructureBlunt : DamageSoundType.StructureSlash;
AmbientSoundManager.PlayDamageSound(damageSoundType, damageAmount, position);
SoundPlayer.PlayDamageSound(damageSoundType, damageAmount, position);
}
AddDamage(i, damageAmount);

View File

@@ -361,7 +361,7 @@ namespace Barotrauma
public void ApplyForce(Vector2 force)
{
subBody.ApplyForce(force);
if (subBody != null) subBody.ApplyForce(force);
}
public void SetPosition(Vector2 position)

View File

@@ -258,7 +258,7 @@ namespace Barotrauma
if (lastContactPoint == null || lastContactCell==null || impact < 3.0f) return;
AmbientSoundManager.PlayDamageSound(DamageSoundType.StructureBlunt, impact * 10.0f, ConvertUnits.ToDisplayUnits((Vector2)lastContactPoint));
SoundPlayer.PlayDamageSound(DamageSoundType.StructureBlunt, impact * 10.0f, ConvertUnits.ToDisplayUnits((Vector2)lastContactPoint));
GameMain.GameScreen.Cam.Shake = impact * 2.0f;
Vector2 limbForce = -normal * impact*0.5f;