Replace WithChargeAnimation with -SpriteBody
PlayFetchIndex on a With*Animation trait conflicts with the animation concept, as it's bound to conflict with pretty much all 'normal' animation traits and blocks progress on the animation priority system. We also already have multiple precedent SpriteBody traits of similar kind, like WithGateSpriteBody and WithWallSpriteBody.
This commit is contained in:
@@ -92,7 +92,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
DefaultAnimation.PlayRepeating(NormalizeSequence(self, Info.Sequence));
|
||||
}
|
||||
|
||||
public void PlayCustomAnimation(Actor self, string name, Action after = null)
|
||||
public virtual void PlayCustomAnimation(Actor self, string name, Action after = null)
|
||||
{
|
||||
DefaultAnimation.PlayThen(NormalizeSequence(self, name), () =>
|
||||
{
|
||||
@@ -102,12 +102,12 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
});
|
||||
}
|
||||
|
||||
public void PlayCustomAnimationRepeating(Actor self, string name)
|
||||
public virtual void PlayCustomAnimationRepeating(Actor self, string name)
|
||||
{
|
||||
DefaultAnimation.PlayRepeating(NormalizeSequence(self, name));
|
||||
}
|
||||
|
||||
public void PlayCustomAnimationBackwards(Actor self, string name, Action after = null)
|
||||
public virtual void PlayCustomAnimationBackwards(Actor self, string name, Action after = null)
|
||||
{
|
||||
DefaultAnimation.PlayBackwardsThen(NormalizeSequence(self, name), () =>
|
||||
{
|
||||
@@ -117,7 +117,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
});
|
||||
}
|
||||
|
||||
public void CancelCustomAnimation(Actor self)
|
||||
public virtual void CancelCustomAnimation(Actor self)
|
||||
{
|
||||
DefaultAnimation.PlayRepeating(NormalizeSequence(self, Info.Sequence));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user