Move WithFire, Burns offsets into sequences.
This commit is contained in:
@@ -15,8 +15,6 @@ namespace OpenRA.Mods.Cnc
|
|||||||
{
|
{
|
||||||
class WithFireInfo : ITraitInfo, Requires<RenderSpritesInfo>
|
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); }
|
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 rs = self.Trait<RenderSprites>();
|
||||||
var roof = new Animation(rs.GetImage(self));
|
var roof = new Animation(rs.GetImage(self));
|
||||||
roof.PlayThen("fire-start", () => roof.PlayRepeating("fire-loop"));
|
roof.PlayThen("fire-start", () => roof.PlayRepeating("fire-loop"));
|
||||||
|
rs.anims.Add("fire", new AnimationWithOffset(roof, null, null, 1024));
|
||||||
rs.anims.Add("fire", new AnimationWithOffset(roof, () => info.Offset, null, 1024));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ namespace OpenRA.Mods.RA
|
|||||||
public readonly string Anim = "1";
|
public readonly string Anim = "1";
|
||||||
public readonly int Damage = 1;
|
public readonly int Damage = 1;
|
||||||
public readonly int Interval = 8;
|
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); }
|
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);
|
var anim = new Animation("fire", () => 0);
|
||||||
anim.PlayRepeating(Info.Anim);
|
anim.PlayRepeating(Info.Anim);
|
||||||
self.Trait<RenderSprites>().anims.Add("fire",
|
self.Trait<RenderSprites>().anims.Add("fire", anim);
|
||||||
new AnimationWithOffset(anim, () => info.Offset, null));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Tick(Actor self)
|
public void Tick(Actor self)
|
||||||
|
|||||||
@@ -482,9 +482,11 @@ v19.husk:
|
|||||||
fire-start: flmspt
|
fire-start: flmspt
|
||||||
Start: 0
|
Start: 0
|
||||||
Length: *
|
Length: *
|
||||||
|
Offset: 7,-15
|
||||||
fire-loop: flmspt
|
fire-loop: flmspt
|
||||||
Start: 50
|
Start: 50
|
||||||
Length: *
|
Length: *
|
||||||
|
Offset: 7,-15
|
||||||
|
|
||||||
v20:
|
v20:
|
||||||
idle:
|
idle:
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ fire:
|
|||||||
1: fire1
|
1: fire1
|
||||||
Start: 0
|
Start: 0
|
||||||
Length: *
|
Length: *
|
||||||
|
Offset: 0,-3
|
||||||
2: fire2
|
2: fire2
|
||||||
Start: 0
|
Start: 0
|
||||||
Length: *
|
Length: *
|
||||||
|
Offset: 0,-3
|
||||||
|
|
||||||
120mm:
|
120mm:
|
||||||
idle:
|
idle:
|
||||||
|
|||||||
@@ -1259,15 +1259,19 @@ fire:
|
|||||||
1: fire2
|
1: fire2
|
||||||
Start: 0
|
Start: 0
|
||||||
Length: *
|
Length: *
|
||||||
|
Offset: 0,-3
|
||||||
2: fire2
|
2: fire2
|
||||||
Start: 0
|
Start: 0
|
||||||
Length: *
|
Length: *
|
||||||
|
Offset: 0,-3
|
||||||
3: fire3
|
3: fire3
|
||||||
Start: 0
|
Start: 0
|
||||||
Length: *
|
Length: *
|
||||||
|
Offset: 0,-3
|
||||||
4: fire
|
4: fire
|
||||||
Start: 0
|
Start: 0
|
||||||
Length: *
|
Length: *
|
||||||
|
Offset: 0,-3
|
||||||
|
|
||||||
smoke_m:
|
smoke_m:
|
||||||
idle: minifire
|
idle: minifire
|
||||||
|
|||||||
@@ -319,15 +319,19 @@ fire:
|
|||||||
1: fire1
|
1: fire1
|
||||||
Start: 0
|
Start: 0
|
||||||
Length: *
|
Length: *
|
||||||
|
Offset: 0,-3
|
||||||
2: fire2
|
2: fire2
|
||||||
Start: 0
|
Start: 0
|
||||||
Length: *
|
Length: *
|
||||||
|
Offset: 0,-3
|
||||||
3: fire3
|
3: fire3
|
||||||
Start: 0
|
Start: 0
|
||||||
Length: *
|
Length: *
|
||||||
|
Offset: 0,-3
|
||||||
4: fire4
|
4: fire4
|
||||||
Start: 0
|
Start: 0
|
||||||
Length: *
|
Length: *
|
||||||
|
Offset: 0,-3
|
||||||
|
|
||||||
rank:
|
rank:
|
||||||
rank:
|
rank:
|
||||||
|
|||||||
Reference in New Issue
Block a user