Map wird nicht mehr gedreht und gespiegelt angezeigt. (Der Server vertauscht tatsächlich col und row)
This commit is contained in:
@@ -74,11 +74,11 @@ namespace WorldOfPeacecraft
|
|||||||
|
|
||||||
public void PaintMap (Graphics g)
|
public void PaintMap (Graphics g)
|
||||||
{
|
{
|
||||||
ITile[,] Map = Backend.GetMap ();
|
ITile[,] map = Backend.GetMap ();
|
||||||
if (Map != null) {
|
if (map != null) {
|
||||||
for (int y = 0; y < Map.GetLength(1); y++) {
|
for (int y = 0; y < map.GetLength(1); y++) {
|
||||||
for (int x = 0; x < Map.GetLength(0); x++) {
|
for (int x = 0; x < map.GetLength(0); x++) {
|
||||||
PaintTile (g, Map [x, y], x, y);
|
PaintTile (g, map [x, y], x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,12 +97,12 @@ namespace WorldOfPeacecraft
|
|||||||
} // Stupid parenthesis
|
} // Stupid parenthesis
|
||||||
else if (tile.IsHuntable ()) {
|
else if (tile.IsHuntable ()) {
|
||||||
color = Color.BurlyWood;
|
color = Color.BurlyWood;
|
||||||
|
} else if (tile.IsWater ()) {
|
||||||
|
color = Color.Blue;
|
||||||
} else if (tile.IsWalkable ()) {
|
} else if (tile.IsWalkable ()) {
|
||||||
color = Color.Yellow;
|
color = Color.Yellow;
|
||||||
} else if (tile.IsWall ()) {
|
} else if (tile.IsWall ()) {
|
||||||
color = Color.DarkGray;
|
color = Color.DarkGray;
|
||||||
} else if (tile.IsWater ()) {
|
|
||||||
color = Color.Blue;
|
|
||||||
} else {
|
} else {
|
||||||
color = Color.Black;
|
color = Color.Black;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace WorldOfPeacecraft
|
|||||||
{
|
{
|
||||||
public Tile[,] map;
|
public Tile[,] map;
|
||||||
|
|
||||||
public Map (int height, int width)
|
public Map (int width, int height)
|
||||||
{
|
{
|
||||||
map = new Tile[height, width];
|
map = new Tile[width, height];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetTile (Tile t)
|
public void SetTile (Tile t)
|
||||||
|
|||||||
@@ -400,8 +400,8 @@ namespace WorldOfPeacecraft
|
|||||||
private Tile MapMapcell (Block cellBlock)
|
private Tile MapMapcell (Block cellBlock)
|
||||||
{
|
{
|
||||||
CheckBlocksSize (cellBlock, 1, 1);
|
CheckBlocksSize (cellBlock, 1, 1);
|
||||||
int x = cellBlock.GetIntValue (ValueCol);
|
int x = cellBlock.GetIntValue (ValueRow);
|
||||||
int y = cellBlock.GetIntValue (ValueRow);
|
int y = cellBlock.GetIntValue (ValueCol);
|
||||||
Block propsBlock = cellBlock.GetBlocks ().First.Value;
|
Block propsBlock = cellBlock.GetBlocks ().First.Value;
|
||||||
bool walkable = false;
|
bool walkable = false;
|
||||||
bool wall = false;
|
bool wall = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user