Add effect definition.
This commit is contained in:
@@ -32,7 +32,9 @@ namespace Cryville.Crtr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Binder(typeof(PdtBinder))]
|
[Binder(typeof(PdtBinder))]
|
||||||
public class PdtSkin : SkinElement { }
|
public class PdtSkin : SkinElement {
|
||||||
|
public Dictionary<Identifier, EffectDefinition> effects = new Dictionary<Identifier, EffectDefinition>();
|
||||||
|
}
|
||||||
|
|
||||||
public class SkinElement {
|
public class SkinElement {
|
||||||
[ElementList]
|
[ElementList]
|
||||||
@@ -63,4 +65,13 @@ namespace Cryville.Crtr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class EffectDefinition {
|
||||||
|
public Identifier[] args;
|
||||||
|
public PdtExpression duration;
|
||||||
|
|
||||||
|
[ElementList]
|
||||||
|
public Dictionary<SkinSelectors, SkinElement> elements
|
||||||
|
= new Dictionary<SkinSelectors, SkinElement>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ namespace Cryville.Crtr {
|
|||||||
readonly HashSet<string> a = new HashSet<string>();
|
readonly HashSet<string> a = new HashSet<string>();
|
||||||
readonly List<string> k = new List<string>(2);
|
readonly List<string> k = new List<string>(2);
|
||||||
protected override object InterpretKey(Type type) {
|
protected override object InterpretKey(Type type) {
|
||||||
|
if (!typeof(SkinElement).IsAssignableFrom(type)) {
|
||||||
|
return base.InterpretKey(type);
|
||||||
|
}
|
||||||
s.Clear(); a.Clear(); k.Clear();
|
s.Clear(); a.Clear(); k.Clear();
|
||||||
bool invalidKeyFlag = false, compKeyFlag = false;
|
bool invalidKeyFlag = false, compKeyFlag = false;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|||||||
Reference in New Issue
Block a user