Make INotifyIdle and INotifyBecomingIdle require explicit implementation
This commit is contained in:
committed by
Matthias Mailänder
parent
ddfed13db4
commit
761a4f29ab
@@ -57,12 +57,17 @@ namespace OpenRA.Mods.Common.Traits
|
||||
base.Created(self);
|
||||
}
|
||||
|
||||
public virtual void OnBecomingIdle(Actor self)
|
||||
protected virtual void OnBecomingIdle(Actor self)
|
||||
{
|
||||
countdown = self.World.SharedRandom.Next(info.MinMoveDelay, info.MaxMoveDelay);
|
||||
}
|
||||
|
||||
public virtual void TickIdle(Actor self)
|
||||
void INotifyBecomingIdle.OnBecomingIdle(Actor self)
|
||||
{
|
||||
OnBecomingIdle(self);
|
||||
}
|
||||
|
||||
protected virtual void TickIdle(Actor self)
|
||||
{
|
||||
if (IsTraitDisabled)
|
||||
return;
|
||||
@@ -83,6 +88,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
DoAction(self, targetCell);
|
||||
}
|
||||
|
||||
void INotifyIdle.TickIdle(Actor self)
|
||||
{
|
||||
TickIdle(self);
|
||||
}
|
||||
|
||||
CPos PickTargetLocation()
|
||||
{
|
||||
var target = self.CenterPosition + new WVec(0, -1024 * effectiveMoveRadius, 0).Rotate(WRot.FromFacing(self.World.SharedRandom.Next(255)));
|
||||
|
||||
Reference in New Issue
Block a user