WithHarvestAnimation style fixes

Make interface implementations explicit.
This commit is contained in:
reaperrr
2017-07-28 16:02:02 +02:00
committed by abcdefg30
parent 0103b7ca87
commit 120d7f9976

View File

@@ -31,6 +31,7 @@ namespace OpenRA.Mods.Common.Traits.Render
readonly WithSpriteBody wsb;
readonly Harvester harv;
// TODO: Remove this once WithSpriteBody has its own replacement
public bool IsModifying;
public WithHarvestAnimation(ActorInitializer init, WithHarvestAnimationInfo info)
@@ -51,7 +52,7 @@ namespace OpenRA.Mods.Common.Traits.Render
return baseSequence;
}
public void Tick(Actor self)
void ITick.Tick(Actor self)
{
var baseSequence = wsb.NormalizeSequence(self, wsb.Info.Sequence);
var sequence = NormalizeHarvesterSequence(self, baseSequence);
@@ -59,7 +60,7 @@ namespace OpenRA.Mods.Common.Traits.Render
wsb.DefaultAnimation.ReplaceAnim(sequence);
}
public void Harvested(Actor self, ResourceType resource)
void INotifyHarvesterAction.Harvested(Actor self, ResourceType resource)
{
var baseSequence = wsb.NormalizeSequence(self, Info.HarvestSequence);
var sequence = NormalizeHarvesterSequence(self, baseSequence);
@@ -72,18 +73,18 @@ namespace OpenRA.Mods.Common.Traits.Render
// If IsModifying isn't set to true, the docking animation
// will be overridden by the WithHarvestAnimation fullness modifier.
public void Docked()
void INotifyHarvesterAction.Docked()
{
IsModifying = true;
}
public void Undocked()
void INotifyHarvesterAction.Undocked()
{
IsModifying = false;
}
public void MovingToResources(Actor self, CPos targetCell, Activity next) { }
public void MovingToRefinery(Actor self, CPos targetCell, Activity next) { }
public void MovementCancelled(Actor self) { }
void INotifyHarvesterAction.MovingToResources(Actor self, CPos targetCell, Activity next) { }
void INotifyHarvesterAction.MovingToRefinery(Actor self, CPos targetCell, Activity next) { }
void INotifyHarvesterAction.MovementCancelled(Actor self) { }
}
}