Unstatic the Sound class.

This commit is contained in:
Paul Chote
2015-09-05 18:31:21 +01:00
parent ff10fe3e07
commit ef55d646f7
82 changed files with 207 additions and 206 deletions

View File

@@ -128,7 +128,7 @@ namespace OpenRA.Mods.Common.Traits
self.World.AddFrameEndTask(w =>
{
var notification = self.Owner.IsAlliedWith(self.World.RenderPlayer) ? Info.LaunchSound : Info.IncomingSound;
Sound.Play(notification);
Game.Sound.Play(notification);
Actor distanceTestActor = null;
for (var i = -info.SquadSize / 2; i <= info.SquadSize / 2; i++)

View File

@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Traits
public override IOrderGenerator OrderGenerator(string order, SupportPowerManager manager)
{
Sound.PlayToPlayer(manager.Self.Owner, Info.SelectTargetSound);
Game.Sound.PlayToPlayer(manager.Self.Owner, Info.SelectTargetSound);
return new SelectTarget(Self.World, order, manager, this);
}
@@ -58,7 +58,7 @@ namespace OpenRA.Mods.Common.Traits
self.Trait<WithSpriteBody>().PlayCustomAnimation(self, info.GrantUpgradeSequence);
Sound.Play(info.GrantUpgradeSound, self.World.Map.CenterOfCell(order.TargetLocation));
Game.Sound.Play(info.GrantUpgradeSound, self.World.Map.CenterOfCell(order.TargetLocation));
foreach (var a in UnitsInRange(order.TargetLocation))
{

View File

@@ -71,9 +71,9 @@ namespace OpenRA.Mods.Common.Traits
base.Activate(self, order, manager);
if (self.Owner.IsAlliedWith(self.World.RenderPlayer))
Sound.Play(Info.LaunchSound);
Game.Sound.Play(Info.LaunchSound);
else
Sound.Play(Info.IncomingSound);
Game.Sound.Play(Info.IncomingSound);
if (!string.IsNullOrEmpty(info.ActivationSequence))
{

View File

@@ -49,7 +49,7 @@ namespace OpenRA.Mods.Common.Traits
{
var location = self.World.Map.CenterOfCell(order.TargetLocation);
Sound.Play(info.DeploySound, location);
Game.Sound.Play(info.DeploySound, location);
if (!string.IsNullOrEmpty(info.EffectSequence) && !string.IsNullOrEmpty(info.EffectPalette))
w.Add(new SpriteEffect(location, w, info.EffectSequence, info.EffectPalette));

View File

@@ -73,12 +73,12 @@ namespace OpenRA.Mods.Common.Traits
public virtual void Charging(Actor self, string key)
{
Sound.PlayToPlayer(self.Owner, Info.BeginChargeSound);
Game.Sound.PlayToPlayer(self.Owner, Info.BeginChargeSound);
}
public virtual void Charged(Actor self, string key)
{
Sound.PlayToPlayer(self.Owner, Info.EndChargeSound);
Game.Sound.PlayToPlayer(self.Owner, Info.EndChargeSound);
}
public virtual void Activate(Actor self, Order order, SupportPowerManager manager)
@@ -95,7 +95,7 @@ namespace OpenRA.Mods.Common.Traits
public virtual IOrderGenerator OrderGenerator(string order, SupportPowerManager manager)
{
Sound.PlayToPlayer(manager.Self.Owner, Info.SelectTargetSound);
Game.Sound.PlayToPlayer(manager.Self.Owner, Info.SelectTargetSound);
return new SelectGenericPowerTarget(order, manager, info.Cursor, MouseButton.Left);
}
}