Rewrite UpgradeManager implementation to suit conditions.

This commit is contained in:
Paul Chote
2016-11-19 16:18:06 +00:00
parent 05187f5828
commit 3f0b33992c
17 changed files with 219 additions and 160 deletions

View File

@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new Wanders(init.Self, this); }
}
public class Wanders : UpgradableTrait<WandersInfo>, INotifyCreated, INotifyIdle, INotifyBecomingIdle
public class Wanders : UpgradableTrait<WandersInfo>, INotifyIdle, INotifyBecomingIdle
{
readonly Actor self;
readonly WandersInfo info;
@@ -50,9 +50,11 @@ namespace OpenRA.Mods.Common.Traits
effectiveMoveRadius = info.WanderMoveRadius;
}
void INotifyCreated.Created(Actor self)
protected override void Created(Actor self)
{
move = self.Trait<IMove>() as IResolveOrder;
base.Created(self);
}
public virtual void OnBecomingIdle(Actor self)