Support dynamic offsets in ActorPreviews.

This commit is contained in:
teees
2016-06-05 11:25:14 +01:00
committed by Paul Chote
parent b7bf7b6ec0
commit 8724ed29bc
20 changed files with 57 additions and 41 deletions

View File

@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Traits.Render
var bi = init.Actor.TraitInfo<BuildingInfo>();
var offset = FootprintUtils.CenterOffset(init.World, bi).Y + 512; // Additional 512 units move from center -> top of cell
yield return new SpriteActorPreview(anim, WVec.Zero, offset, p, rs.Scale);
yield return new SpriteActorPreview(anim, () => WVec.Zero, () => offset, p, rs.Scale);
}
}