Beispiel #1
0
        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)));
                }
            }
        }
Beispiel #2
0
        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)));
                }
            }
        }
Beispiel #3
0
 void INotifyOwnerChanged.OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)
 {
     PlayerPower.RemoveActor(self);
     PlayerPower = newOwner.PlayerActor.Trait <PowerManager>();
     PlayerPower.UpdateActor(self);
 }
Beispiel #4
0
 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);
 }
Beispiel #7
0
 protected override void Update(Actor self)
 {
     power.UpdateActor(self);
 }