Flipping sprites of staircases & engine

This commit is contained in:
juanjp600
2016-10-01 16:41:16 -03:00
parent d7047c0df8
commit bdcd894b83
8 changed files with 81 additions and 39 deletions

View File

@@ -58,6 +58,8 @@ namespace Barotrauma
private set;
}
private bool canSpriteFlipX;
//if a matching itemprefab is not found when loading a sub, the game will attempt to find a prefab with a matching alias
//(allows changing item names while keeping backwards compatibility with older sub files)
public string[] Aliases
@@ -116,6 +118,11 @@ namespace Barotrauma
private set;
}
public bool CanSpriteFlipX
{
get { return canSpriteFlipX; }
}
public Vector2 Size
{
get { return size; }
@@ -281,6 +288,9 @@ namespace Barotrauma
spriteFolder = Path.GetDirectoryName(filePath);
}
if (ToolBox.GetAttributeBool(subElement, "canflipx", false))
canSpriteFlipX = true;
sprite = new Sprite(subElement, spriteFolder);
size = sprite.size;
break;