public void ResolveOrder(Actor self, Order order) { if (!IsTraitDisabled && order.OrderString == "PowerDown") { disabled = !disabled; if (Info.PowerupSound != null && disabled) { Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Sounds", Info.PowerupSound, self.Owner.Faction.InternalName); } if (Info.PowerdownSound != null && !disabled) { Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Sounds", Info.PowerdownSound, self.Owner.Faction.InternalName); } if (Info.PowerupSpeech != null && disabled) { Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", Info.PowerupSpeech, self.Owner.Faction.InternalName); } if (Info.PowerdownSpeech != null && !disabled) { Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", Info.PowerdownSpeech, self.Owner.Faction.InternalName); } power.UpdateActor(self); if (disabled) { self.World.AddFrameEndTask(w => w.Add(new PowerdownIndicator(self))); } } }
public void ResolveOrder(Actor self, Order order) { if (!IsTraitDisabled && order.OrderString == "PowerDown") { disabled = !disabled; Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Sounds", disabled ? "EnablePower" : "DisablePower", self.Owner.Country.Race); power.UpdateActor(self); if (disabled) { self.World.AddFrameEndTask(w => w.Add(new PowerdownIndicator(self))); } } }
void INotifyOwnerChanged.OnOwnerChanged(Actor self, Player oldOwner, Player newOwner) { PlayerPower.RemoveActor(self); PlayerPower = newOwner.PlayerActor.Trait <PowerManager>(); PlayerPower.UpdateActor(self); }
void INotifyDamage.Damaged(Actor self, AttackInfo e) { power.UpdateActor(self); }
protected override void TraitEnabled(Actor self) { power.UpdateActor(self); }
public void Damaged(Actor self, AttackInfo e) { power.UpdateActor(self); }
protected override void Update(Actor self) { power.UpdateActor(self); }