38f1ddb...178a853: v0.8.9.1, removed content folder

This commit is contained in:
Joonas Rikkonen
2019-03-18 19:46:58 +02:00
parent 38f1ddb6fe
commit 6c0679c297
1054 changed files with 151673 additions and 144931 deletions
@@ -1,5 +1,6 @@
using System;
using System.Xml.Linq;
using Barotrauma.Sounds;
namespace Barotrauma
{
@@ -10,17 +11,26 @@ namespace Barotrauma
Idle, Attack, Die
}
public readonly Sound Sound;
private readonly RoundSound roundSound;
public readonly SoundType Type;
public readonly float Range;
public float Volume
{
get { return roundSound.Volume; }
}
public float Range
{
get { return roundSound.Range; }
}
public Sound Sound
{
get { return roundSound.Sound; }
}
public CharacterSound(XElement element)
{
Sound = Sound.Load(element.Attribute("file").Value);
Range = element.GetAttributeFloat("range", 1000.0f);
roundSound = Submarine.LoadRoundSound(element);
Enum.TryParse<SoundType>(element.GetAttributeString("state", "Idle"), true, out Type);
}
}