Narrow caves in levels, more background sprites

This commit is contained in:
Regalis
2016-04-10 10:57:38 +03:00
parent c5685db0aa
commit c6df095a8b
10 changed files with 270 additions and 87 deletions
@@ -1,4 +1,5 @@
using System;
using Microsoft.Xna.Framework;
using System;
using System.Xml.Linq;
namespace Barotrauma
@@ -9,6 +10,12 @@ namespace Barotrauma
public readonly Alignment Alignment;
public readonly Vector2 Scale;
public readonly bool AlignWithSurface;
public readonly Vector2 RandomRotation;
public readonly int Commonness;
public BackgroundSpritePrefab(XElement element)
@@ -19,6 +26,15 @@ namespace Barotrauma
Commonness = ToolBox.GetAttributeInt(element, "commonness", 1);
Scale.X = ToolBox.GetAttributeFloat(element, "minsize", 1.0f);
Scale.Y = ToolBox.GetAttributeFloat(element, "maxsize", 1.0f);
AlignWithSurface = ToolBox.GetAttributeBool(element, "alignwithsurface", false);
RandomRotation = ToolBox.GetAttributeVector2(element, "randomrotation", Vector2.Zero);
RandomRotation.X = MathHelper.ToRadians(RandomRotation.X);
RandomRotation.Y = MathHelper.ToRadians(RandomRotation.Y);
foreach (XElement subElement in element.Elements())
{
if (subElement.Name.ToString().ToLower() != "sprite") continue;