reposition tanks on map switch, rework map logic
This commit is contained in:
parent
3d65c81b8b
commit
97144ae3b8
13 changed files with 208 additions and 117 deletions
|
@ -26,5 +26,17 @@ internal sealed class Sprite(bool?[,] data)
|
|||
public bool? this[int x, int y] => data[x, y];
|
||||
|
||||
public int Width => data.GetLength(0);
|
||||
|
||||
public int Height => data.GetLength(1);
|
||||
|
||||
public bool[,] ToBoolArray()
|
||||
{
|
||||
var result = new bool[Width, Height];
|
||||
|
||||
for (var y = 0; y < Height; y++)
|
||||
for (var x = 0; x < Width; x++)
|
||||
result[x, y] = this[x, y] ?? false;
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue