Add wrappers for RenderSprites anims dictionary.
This commit is contained in:
@@ -35,7 +35,7 @@ namespace OpenRA.Traits
|
||||
public RenderSimple(Actor self, Func<int> baseFacing)
|
||||
: base(self)
|
||||
{
|
||||
anims.Add("", new Animation(self.World, GetImage(self), baseFacing));
|
||||
Add("", new Animation(self.World, GetImage(self), baseFacing));
|
||||
Info = self.Info.Traits.Get<RenderSimpleInfo>();
|
||||
}
|
||||
|
||||
|
||||
@@ -105,6 +105,16 @@ namespace OpenRA.Traits
|
||||
a.Animation.Tick();
|
||||
}
|
||||
|
||||
public void Add(string key, AnimationWithOffset anim)
|
||||
{
|
||||
anims.Add(key, anim);
|
||||
}
|
||||
|
||||
public void Remove(string key)
|
||||
{
|
||||
anims.Remove(key);
|
||||
}
|
||||
|
||||
public static string NormalizeSequence(Animation anim, DamageState state, string baseSequence)
|
||||
{
|
||||
var states = new Pair<DamageState, string>[]
|
||||
|
||||
Reference in New Issue
Block a user