Make WithSpriteTurret ITick implementation explicit

This commit is contained in:
reaperrr
2016-10-20 21:43:50 +02:00
parent 77a134da91
commit 61779bf02a
2 changed files with 8 additions and 2 deletions

View File

@@ -57,7 +57,7 @@ namespace OpenRA.Mods.Cnc.Traits.Render
ammoSuffix = (initialAmmoStage * reloadStages / ammo).ToString(); ammoSuffix = (initialAmmoStage * reloadStages / ammo).ToString();
} }
public override void Tick(Actor self) protected override void Tick(Actor self)
{ {
if (Info.AimSequence != null) if (Info.AimSequence != null)
sequence = Attack.IsAttacking ? Info.AimSequence : Info.Sequence; sequence = Attack.IsAttacking ? Info.AimSequence : Info.Sequence;

View File

@@ -119,7 +119,7 @@ namespace OpenRA.Mods.Common.Traits.Render
DefaultAnimation.ReplaceAnim(NormalizeSequence(self, DefaultAnimation.CurrentSequence.Name)); DefaultAnimation.ReplaceAnim(NormalizeSequence(self, DefaultAnimation.CurrentSequence.Name));
} }
public virtual void Tick(Actor self) protected virtual void Tick(Actor self)
{ {
if (Info.AimSequence == null) if (Info.AimSequence == null)
return; return;
@@ -133,6 +133,12 @@ namespace OpenRA.Mods.Common.Traits.Render
DamageStateChanged(self); DamageStateChanged(self);
} }
void ITick.Tick(Actor self)
{
// Split into a protected method to allow subclassing
Tick(self);
}
void INotifyBuildComplete.BuildingComplete(Actor self) { buildComplete = true; } void INotifyBuildComplete.BuildingComplete(Actor self) { buildComplete = true; }
void INotifySold.Selling(Actor self) { buildComplete = false; } void INotifySold.Selling(Actor self) { buildComplete = false; }
void INotifySold.Sold(Actor self) { } void INotifySold.Sold(Actor self) { }