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));
}
}
}

View File

@@ -18,7 +18,6 @@ namespace OpenRA.Mods.RA
public readonly string Anim = "1";
public readonly int Damage = 1;
public readonly int Interval = 8;
public readonly WVec Offset = new WVec(0,0,128);
public object Create(ActorInitializer init) { return new Burns(init.self, this); }
}
@@ -34,8 +33,7 @@ namespace OpenRA.Mods.RA
var anim = new Animation("fire", () => 0);
anim.PlayRepeating(Info.Anim);
self.Trait<RenderSprites>().anims.Add("fire",
new AnimationWithOffset(anim, () => info.Offset, null));
self.Trait<RenderSprites>().anims.Add("fire", anim);
}
public void Tick(Actor self)

View File

@@ -482,9 +482,11 @@ v19.husk:
fire-start: flmspt
Start: 0
Length: *
Offset: 7,-15
fire-loop: flmspt
Start: 50
Length: *
Offset: 7,-15
v20:
idle:

View File

@@ -7,9 +7,11 @@ fire:
1: fire1
Start: 0
Length: *
Offset: 0,-3
2: fire2
Start: 0
Length: *
Offset: 0,-3
120mm:
idle:

View File

@@ -1259,15 +1259,19 @@ fire:
1: fire2
Start: 0
Length: *
Offset: 0,-3
2: fire2
Start: 0
Length: *
Offset: 0,-3
3: fire3
Start: 0
Length: *
Offset: 0,-3
4: fire
Start: 0
Length: *
Offset: 0,-3
smoke_m:
idle: minifire

View File

@@ -319,15 +319,19 @@ fire:
1: fire1
Start: 0
Length: *
Offset: 0,-3
2: fire2
Start: 0
Length: *
Offset: 0,-3
3: fire3
Start: 0
Length: *
Offset: 0,-3
4: fire4
Start: 0
Length: *
Offset: 0,-3
rank:
rank: