Improve shroud performance
This commit is contained in:
@@ -15,6 +15,8 @@ namespace OpenRA
|
||||
{
|
||||
public sealed class ProjectedCellLayer<T> : CellLayerBase<T>
|
||||
{
|
||||
public int MaxIndex { get { return Size.Width * Size.Height; } }
|
||||
|
||||
public ProjectedCellLayer(Map map)
|
||||
: base(map) { }
|
||||
|
||||
@@ -27,6 +29,11 @@ namespace OpenRA
|
||||
return uv.V * Size.Width + uv.U;
|
||||
}
|
||||
|
||||
public PPos PPosFromIndex(int index)
|
||||
{
|
||||
return new PPos(index % Size.Width, index / Size.Width);
|
||||
}
|
||||
|
||||
public T this[int index]
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user