Move WithFire, Burns offsets into sequences.

This commit is contained in:
Paul Chote
2013-06-20 22:01:59 +12:00
parent fc33c56d61
commit 3095c6ea5f
6 changed files with 14 additions and 7 deletions

View File

@@ -15,8 +15,6 @@ namespace OpenRA.Mods.Cnc
{
class WithFireInfo : ITraitInfo, Requires<RenderSpritesInfo>
{
public readonly WVec Offset = new WVec(299,-640,0);
public object Create(ActorInitializer init) { return new WithFire(init.self, this); }
}
@@ -27,8 +25,7 @@ namespace OpenRA.Mods.Cnc
var rs = self.Trait<RenderSprites>();
var roof = new Animation(rs.GetImage(self));
roof.PlayThen("fire-start", () => roof.PlayRepeating("fire-loop"));
rs.anims.Add("fire", new AnimationWithOffset(roof, () => info.Offset, null, 1024));
rs.anims.Add("fire", new AnimationWithOffset(roof, null, null, 1024));
}
}
}