RenderBeforeWorld/RenderAfterWorld split. still need to sort out which behavior belongs where.

This commit is contained in:
Chris Forbes
2010-07-26 18:19:39 +12:00
parent 9cf8ac0c3d
commit 69d30ac71b
17 changed files with 59 additions and 31 deletions

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Traits
public virtual object Create(ActorInitializer init) { return new DrawLineToTarget(this); }
}
public class DrawLineToTarget :IRenderSelection
public class DrawLineToTarget :IPostRenderSelection
{
DrawLineToTargetInfo Info;
public DrawLineToTarget(DrawLineToTargetInfo info)
@@ -44,7 +44,7 @@ namespace OpenRA.Traits
this.c = c;
}
public void Render (Actor self)
public void RenderAfterWorld (Actor self)
{
var force = Game.controller.GetModifiers().HasModifier(Modifiers.Alt);
if ((lifetime <= 0 || --lifetime <= 0) && !force)