Make TeslaZap color palette customizable.

This commit is contained in:
reaperrr
2014-05-03 00:02:12 +02:00
parent 26ae11c155
commit 9f0f11db54
2 changed files with 19 additions and 16 deletions

View File

@@ -18,6 +18,7 @@ namespace OpenRA.Mods.RA.Effects
class TeslaZapInfo : IProjectileInfo
{
public readonly string Image = "litning";
public readonly string Palette = "effect";
public readonly int BrightZaps = 1;
public readonly int DimZaps = 2;
public IEffect Create(ProjectileArgs args) { return new TeslaZap( this, args ); }
@@ -56,7 +57,7 @@ namespace OpenRA.Mods.RA.Effects
if (!initialized)
{
var pos = Args.GuidedTarget.IsValidFor(Args.SourceActor) ? Args.GuidedTarget.CenterPosition : Args.PassiveTarget;
zap = new TeslaZapRenderable(Args.Source, 0, pos - Args.Source, Info.Image, Info.BrightZaps, Info.DimZaps);
zap = new TeslaZapRenderable(Args.Source, 0, pos - Args.Source, Info.Image, Info.BrightZaps, Info.DimZaps, Info.Palette);
}
yield return zap;
}