Tweak cnc wall sounds.

This commit is contained in:
Paul Chote
2011-01-04 12:35:22 +13:00
parent 03185fe46b
commit 4a47641656
3 changed files with 13 additions and 5 deletions

View File

@@ -16,7 +16,7 @@ namespace OpenRA.Mods.RA.Buildings
public class WallInfo : ITraitInfo, ITraitPrerequisite<BuildingInfo>
{
public readonly string[] CrushClasses = { };
public readonly string CrushSound;
public object Create(ActorInitializer init) { return new Wall(init.self, this); }
}
@@ -32,6 +32,10 @@ namespace OpenRA.Mods.RA.Buildings
}
public IEnumerable<string> CrushClasses { get { return info.CrushClasses; } }
public void OnCrush(Actor crusher) { self.Kill(crusher); }
public void OnCrush(Actor crusher)
{
self.Kill(crusher);
Sound.Play(info.CrushSound, self.CenterLocation);
}
}
}