Introduce INotifyAttack.PreparingAttack
And use it to allow triggering attack animations/overlays at a different point than the actual weapon firing.
This commit is contained in:
@@ -50,7 +50,9 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
info.Palette, info.IsPlayerPalette);
|
||||
}
|
||||
|
||||
void INotifyAttack.Attacking(Actor self, Target target, Armament a, Barrel barrel)
|
||||
void INotifyAttack.Attacking(Actor self, Target target, Armament a, Barrel barrel) { }
|
||||
|
||||
void INotifyAttack.PreparingAttack(Actor self, Target target, Armament a, Barrel barrel)
|
||||
{
|
||||
attacking = true;
|
||||
overlay.PlayThen(info.Sequence, () => attacking = false);
|
||||
|
||||
Reference in New Issue
Block a user