Use INotifyCreated instead of INotifyAddedToWorld in AttackOrderPower

This commit is contained in:
abcdefg30
2016-06-12 14:46:01 +02:00
parent 1ea0607548
commit b898e810bb

View File

@@ -24,7 +24,7 @@ namespace OpenRA.Mods.TS.Traits
public override object Create(ActorInitializer init) { return new AttackOrderPower(init.Self, this); } public override object Create(ActorInitializer init) { return new AttackOrderPower(init.Self, this); }
} }
class AttackOrderPower : SupportPower, INotifyAddedToWorld, INotifyBurstComplete class AttackOrderPower : SupportPower, INotifyCreated, INotifyBurstComplete
{ {
readonly AttackOrderPowerInfo info; readonly AttackOrderPowerInfo info;
AttackBase attack; AttackBase attack;
@@ -47,7 +47,7 @@ namespace OpenRA.Mods.TS.Traits
attack.AttackTarget(Target.FromCell(self.World, order.TargetLocation), false, false, true); attack.AttackTarget(Target.FromCell(self.World, order.TargetLocation), false, false, true);
} }
void INotifyAddedToWorld.AddedToWorld(Actor self) void INotifyCreated.Created(Actor self)
{ {
attack = self.Trait<AttackBase>(); attack = self.Trait<AttackBase>();
} }