Some more cleanup + event desync debug messages
This commit is contained in:
@@ -15,7 +15,11 @@ namespace Barotrauma
|
||||
{
|
||||
partial class Limb
|
||||
{
|
||||
public readonly LightSource LightSource;
|
||||
public LightSource LightSource
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
Sound hitSound;
|
||||
|
||||
@@ -24,6 +28,31 @@ namespace Barotrauma
|
||||
get { return hitSound; }
|
||||
}
|
||||
|
||||
partial void InitProjSpecific(XElement element)
|
||||
{
|
||||
foreach (XElement subElement in element.Elements())
|
||||
{
|
||||
switch (subElement.Name.ToString().ToLowerInvariant())
|
||||
{
|
||||
case "lightsource":
|
||||
LightSource = new LightSource(subElement);
|
||||
break;
|
||||
case "sound":
|
||||
hitSound = Sound.Load(ToolBox.GetAttributeString(subElement, "file", ""));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
partial void UpdateProjSpecific()
|
||||
{
|
||||
if (LightSource != null)
|
||||
{
|
||||
LightSource.Rotation = dir == Direction.Right ? body.DrawRotation : body.DrawRotation - MathHelper.Pi;
|
||||
LightSource.ParentSub = body.Submarine;
|
||||
}
|
||||
}
|
||||
|
||||
public void Draw(SpriteBatch spriteBatch)
|
||||
{
|
||||
float brightness = 1.0f - (burnt / 100.0f) * 0.5f;
|
||||
|
||||
Reference in New Issue
Block a user