1 using System.Collections.Generic;
8 public readonly List<PropertyConditional>
conditionals =
new List<PropertyConditional>();
9 public bool IsActive {
get;
private set; } =
true;
23 foreach (var subElement
in element.Elements())
25 switch (subElement.Name.ToString().ToLowerInvariant())
31 Sprite =
new Sprite(subElement, file: file, lazyLoad: lazyLoad, sourceRectScale: sourceRectScale);
33 case "deformablesprite":
readonly List< PropertyConditional > conditionals
readonly PropertyConditional.LogicalOperatorType LogicalOperator
ConditionalSprite(ContentXElement element, ISerializableEntity target, string file="", bool lazyLoad=false, float sourceRectScale=1)
ISerializableEntity Target
DeformableSprite DeformableSprite
bool GetAttributeBool(string key, bool def)
Conditionals are used by some in-game mechanics to require one or more conditions to be met for those...
static bool CheckConditionals(ISerializableEntity conditionalTarget, IEnumerable< PropertyConditional > conditionals, LogicalOperatorType logicalOperator)
static IEnumerable< PropertyConditional > FromXElement(ContentXElement element, Predicate< XAttribute >? predicate=null)