Added WithFacingSpriteBody trait.

Extracted AutoSelectionSize into its own trait.

RenderUnit -> RenderSprites + WithFacingSpriteBody upgrade rule

Remove RenderSimple dependencies of ThrowsParticle
and WithHarvestAnimation.
This commit is contained in:
reaperrr
2015-05-10 04:47:41 +02:00
parent 9b52bff87d
commit 0e3a53bec7
8 changed files with 165 additions and 27 deletions

View File

@@ -236,8 +236,8 @@ namespace OpenRA.Mods.Common.Traits
return sequence;
}
// Required by RenderSimple
protected int2 AutoSelectionSize(Actor self)
// Required by RenderSimple, WithSpriteBody and WithInfantryBody
public int2 AutoSelectionSize(Actor self)
{
return anims.Where(b => b.IsVisible
&& b.Animation.Animation.CurrentSequence != null)