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:
@@ -64,12 +64,14 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return base.CanAttack(self, target);
|
||||
}
|
||||
|
||||
public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
|
||||
void INotifyAttack.Attacking(Actor self, Target target, Armament a, Barrel barrel)
|
||||
{
|
||||
--charges;
|
||||
timeToRecharge = info.ReloadDelay;
|
||||
}
|
||||
|
||||
void INotifyAttack.PreparingAttack(Actor self, Target target, Armament a, Barrel barrel) { }
|
||||
|
||||
public override Activity GetAttackActivity(Actor self, Target newTarget, bool allowMove, bool forceAttack)
|
||||
{
|
||||
return new ChargeAttack(this, newTarget);
|
||||
|
||||
Reference in New Issue
Block a user