Lint test and SpawnActorPower effect sprite and palette.

This commit is contained in:
Matthias Mailänder
2016-04-02 15:12:08 +02:00
parent aa4ffe5bd4
commit 9458a74e9c
3 changed files with 12 additions and 4 deletions

View File

@@ -28,8 +28,9 @@ namespace OpenRA.Mods.Common.Traits
public readonly string DeploySound = null;
public readonly string EffectSequence = null;
public readonly string EffectPalette = null;
public readonly string EffectImage = null;
[SequenceReference("EffectImage")] public readonly string EffectSequence = "idle";
[PaletteReference] public readonly string EffectPalette = null;
public override object Create(ActorInitializer init) { return new SpawnActorPower(init.Self, this); }
}
@@ -52,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits
Game.Sound.Play(info.DeploySound, location);
if (!string.IsNullOrEmpty(info.EffectSequence) && !string.IsNullOrEmpty(info.EffectPalette))
w.Add(new SpriteEffect(location, w, info.EffectSequence, "idle", info.EffectPalette));
w.Add(new SpriteEffect(location, w, info.EffectImage, info.EffectSequence, info.EffectPalette));
var actor = w.CreateActor(info.Actor, new TypeDictionary
{