Files
LuaCsForBarotraumaEP/Barotrauma/BarotraumaClient/Source/Characters/CharacterSound.cs
Joonas Rikkonen 044fd3344b 2f107db...5202af9
2019-03-18 21:42:26 +02:00

41 lines
933 B
C#

using System;
using System.Xml.Linq;
using Barotrauma.Sounds;
namespace Barotrauma
{
class CharacterSound
{
public enum SoundType
{
Idle, Attack, Die, Damage
}
private readonly RoundSound roundSound;
public readonly SoundType Type;
public float Volume
{
get { return roundSound.Volume; }
}
public float Range
{
get { return roundSound.Range; }
}
public Sound Sound
{
get { return roundSound.Sound; }
}
public readonly Gender Gender;
public CharacterSound(XElement element)
{
roundSound = Submarine.LoadRoundSound(element);
Enum.TryParse(element.GetAttributeString("state", "Idle"), true, out Type);
Enum.TryParse(element.GetAttributeString("gender", "None"), true, out Gender);
}
}
}