hack CrateEffect to have a custom offset; add levelup.shp; change > to >= in GainsExperience

This commit is contained in:
Chris Forbes
2010-05-27 19:02:07 +12:00
parent 1bd9dc7536
commit 230625897a
4 changed files with 13 additions and 9 deletions

View File

@@ -29,7 +29,13 @@ namespace OpenRA.Mods.RA.Effects
{
Actor a;
Animation anim = new Animation("crate-effects");
float2 doorOffset = new float2(-4,0);
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)
{
@@ -46,7 +52,7 @@ namespace OpenRA.Mods.RA.Effects
public IEnumerable<Renderable> Render()
{
yield return new Renderable(anim.Image,
a.CenterLocation - .5f * anim.Image.size + doorOffset, "effect");
a.CenterLocation - .5f * anim.Image.size + offset, "effect");
}
}
}