Change IRenderable.WithPos -> OffsetBy.

This is more appropriate for the actual use cases.
Fixes #3621.
This commit is contained in:
Paul Chote
2013-08-03 11:16:52 +12:00
parent 3788d4f185
commit 805b4b6258
11 changed files with 18 additions and 15 deletions

View File

@@ -11,6 +11,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
namespace OpenRA.Graphics
{
@@ -49,7 +50,7 @@ namespace OpenRA.Graphics
public IRenderable WithScale(float newScale) { return new ContrailRenderable(world, (WPos[])trail.Clone(), next, length, skip, color, zOffset); }
public IRenderable WithPalette(PaletteReference newPalette) { return new ContrailRenderable(world, (WPos[])trail.Clone(), next, length, skip, color, zOffset); }
public IRenderable WithZOffset(int newOffset) { return new ContrailRenderable(world, (WPos[])trail.Clone(), next, length, skip, color, newOffset); }
public IRenderable WithPos(WPos pos) { return new ContrailRenderable(world, (WPos[])trail.Clone(), next, length, skip, color, zOffset); }
public IRenderable OffsetBy(WVec vec) { return new ContrailRenderable(world, trail.Select(pos => pos + vec).ToArray(), next, length, skip, color, zOffset); }
public void BeforeRender(WorldRenderer wr) {}
public void Render(WorldRenderer wr)