(d9829ac) v0.9.4.0

This commit is contained in:
Regalis
2019-10-24 18:05:42 +02:00
parent 9aa12bcac2
commit b39922a074
319 changed files with 12516 additions and 6815 deletions
@@ -1,6 +1,4 @@
using System;
using System.Xml.Linq;
using Barotrauma.Sounds;
using Barotrauma.Sounds;
namespace Barotrauma
{
@@ -12,29 +10,18 @@ namespace Barotrauma
}
private readonly RoundSound roundSound;
public readonly CharacterParams.SoundParams Params;
public readonly SoundType Type;
public SoundType Type => Params.State;
public Gender Gender => Params.Gender;
public float Volume => roundSound.Volume;
public float Range => roundSound.Range;
public Sound Sound => roundSound?.Sound;
public float Volume
public CharacterSound(CharacterParams.SoundParams soundParams)
{
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);
Params = soundParams;
roundSound = Submarine.LoadRoundSound(soundParams.Element);
}
}
}