Unhardcode, lint-test and self-document the ion cannon sequence.

This commit is contained in:
Matthias Mailänder
2016-07-12 07:33:30 +02:00
parent 67ba8c1bcc
commit 3aea7bf955
2 changed files with 8 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Cnc.Effects
int weaponDelay;
bool impacted = false;
public IonCannon(Player firedBy, WeaponInfo weapon, World world, CPos location, string effect, string palette, int delay)
public IonCannon(Player firedBy, WeaponInfo weapon, World world, CPos location, string effect, string sequence, string palette, int delay)
{
this.firedBy = firedBy;
this.weapon = weapon;
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Cnc.Effects
weaponDelay = delay;
target = Target.FromCell(world, location);
anim = new Animation(world, effect);
anim.PlayThen("idle", () => Finish(world));
anim.PlayThen(sequence, () => Finish(world));
}
public void Tick(World world)