Use INotifyCreated instead of INotifyAddedToWorld in AttackOrderPower
This commit is contained in:
@@ -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>();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user