Introduce SoundType enum.
This commit is contained in:
@@ -50,7 +50,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
self.Trait<WithInfantryBody>().Attacking(self, Target.FromActor(target), a);
|
||||
|
||||
if (weapon.Report != null && weapon.Report.Any())
|
||||
Game.Sound.Play(weapon.Report.Random(self.World.SharedRandom), self.CenterPosition);
|
||||
Game.Sound.Play(SoundType.World, weapon.Report.Random(self.World.SharedRandom), self.CenterPosition);
|
||||
}
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
|
||||
@@ -60,8 +60,8 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
destination = bestCell.Value;
|
||||
|
||||
Game.Sound.Play(sound, self.CenterPosition);
|
||||
Game.Sound.Play(sound, self.World.Map.CenterOfCell(destination));
|
||||
Game.Sound.Play(SoundType.World, sound, self.CenterPosition);
|
||||
Game.Sound.Play(SoundType.World, sound, self.World.Map.CenterOfCell(destination));
|
||||
|
||||
self.Trait<IPositionable>().SetPosition(self, destination);
|
||||
self.Generation++;
|
||||
|
||||
@@ -159,9 +159,9 @@ namespace OpenRA.Mods.RA.Traits
|
||||
wfsb.PlayCustomAnimationRepeating(self, info.ThumpSequence);
|
||||
deployed = true;
|
||||
self.QueueActivity(new Wait(info.ChargeDelay, false));
|
||||
self.QueueActivity(new CallFunc(() => Game.Sound.Play(info.ChargeSound, self.CenterPosition)));
|
||||
self.QueueActivity(new CallFunc(() => Game.Sound.Play(SoundType.World, info.ChargeSound, self.CenterPosition)));
|
||||
self.QueueActivity(new Wait(info.DetonationDelay, false));
|
||||
self.QueueActivity(new CallFunc(() => Game.Sound.Play(info.DetonationSound, self.CenterPosition)));
|
||||
self.QueueActivity(new CallFunc(() => Game.Sound.Play(SoundType.World, info.DetonationSound, self.CenterPosition)));
|
||||
self.QueueActivity(new CallFunc(Detonate));
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
|
||||
public override void SelectTarget(Actor self, string order, SupportPowerManager manager)
|
||||
{
|
||||
Game.Sound.PlayToPlayer(manager.Self.Owner, Info.SelectTargetSound);
|
||||
Game.Sound.PlayToPlayer(SoundType.UI, manager.Self.Owner, Info.SelectTargetSound);
|
||||
self.World.OrderGenerator = new SelectChronoshiftTarget(Self.World, order, manager, this);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
|
||||
self.World.AddFrameEndTask(w =>
|
||||
{
|
||||
Game.Sound.PlayToPlayer(self.Owner, Info.LaunchSound);
|
||||
Game.Sound.PlayToPlayer(SoundType.World, self.Owner, Info.LaunchSound);
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech",
|
||||
Info.LaunchSpeechNotification, self.Owner.Faction.InternalName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user