New types for cell and pixel coordinate position/vectors.

This commit is contained in:
James Dunne
2012-06-20 23:22:27 -05:00
parent 0b98a8ce5e
commit 9c49143534
162 changed files with 1291 additions and 865 deletions

View File

@@ -18,8 +18,8 @@ namespace OpenRA.Mods.RA.Effects
{
class RallyPoint : IEffect
{
Actor building;
RA.RallyPoint rp;
readonly Actor building;
readonly RA.RallyPoint rp;
public Animation flag = new Animation("rallypoint");
public Animation circles = new Animation("rallypoint");
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.RA.Effects
circles.Play("circles");
}
int2 cachedLocation;
CPos cachedLocation;
public void Tick( World world )
{
flag.Tick();
@@ -55,11 +55,11 @@ namespace OpenRA.Mods.RA.Effects
var palette = building.Trait<RenderSimple>().Palette(building.Owner);
yield return new Renderable(circles.Image,
pos - .5f * circles.Image.size,
pos.ToFloat2() - .5f * circles.Image.size,
palette, (int)pos.Y);
yield return new Renderable(flag.Image,
pos + new float2(-1,-17),
pos.ToFloat2() + new float2(-1,-17),
palette, (int)pos.Y);
}
}