Split IFinalizedRenderable from Renderable to remove mutable structs.
This commit is contained in:
@@ -14,7 +14,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Graphics
|
||||
{
|
||||
public struct SelectionBoxRenderable : IRenderable
|
||||
public struct SelectionBoxRenderable : IRenderable, IFinalizedRenderable
|
||||
{
|
||||
readonly WPos pos;
|
||||
readonly float scale;
|
||||
@@ -45,7 +45,7 @@ namespace OpenRA.Graphics
|
||||
public IRenderable OffsetBy(WVec vec) { return new SelectionBoxRenderable(pos + vec, bounds, scale, color); }
|
||||
public IRenderable AsDecoration() { return this; }
|
||||
|
||||
public void BeforeRender(WorldRenderer wr) { }
|
||||
public IFinalizedRenderable PrepareRender(WorldRenderer wr) { return this; }
|
||||
public void Render(WorldRenderer wr)
|
||||
{
|
||||
var screenPos = wr.ScreenPxPosition(pos);
|
||||
|
||||
Reference in New Issue
Block a user