Convert CrateEffect to world coordinates.
This commit is contained in:
@@ -19,13 +19,6 @@ namespace OpenRA.Mods.RA.Effects
|
||||
{
|
||||
Actor a;
|
||||
Animation anim = new Animation("crate-effects");
|
||||
float2 offset = new float2(-4,0);
|
||||
|
||||
public CrateEffect(Actor a, string seq, int2 offset)
|
||||
: this(a, seq)
|
||||
{
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public CrateEffect(Actor a, string seq)
|
||||
{
|
||||
@@ -43,8 +36,7 @@ namespace OpenRA.Mods.RA.Effects
|
||||
{
|
||||
if (a.IsInWorld)
|
||||
yield return new SpriteRenderable(anim.Image,
|
||||
a.CenterLocation.ToFloat2() + offset,
|
||||
wr.Palette("effect"), (int)a.CenterLocation.Y);
|
||||
a.CenterPosition, 0, wr.Palette("effect"), 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
Level++;
|
||||
Sound.PlayNotification(self.Owner, "Sounds", "LevelUp", self.Owner.Country.Race);
|
||||
self.World.AddFrameEndTask(w => w.Add(new CrateEffect(self, "levelup", new int2(0,-24))));
|
||||
self.World.AddFrameEndTask(w => w.Add(new CrateEffect(self, "levelup")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user