Wegfindung wird jetzt ausgeführt, wenn auf ein Feld auf der Karte geklickt wird

This commit is contained in:
2014-05-07 19:39:18 +02:00
parent 117c9e601c
commit 0e2dbe54dc
5 changed files with 49 additions and 9 deletions

View File

@@ -17,10 +17,10 @@ namespace WorldOfPeacecraft
void SendCommand (string command);
void moveUp();
void moveDown();
void moveLeft();
void moveRight();
void MoveTo(int x, int y);
void StartThreads();

View File

@@ -50,7 +50,9 @@ namespace WorldOfPeacecraft
protected override void OnMouseClick (MouseEventArgs e)
{
base.OnMouseClick (e);
//TODO: Things.
int targetX = e.X / TileSize;
int targetY = e.Y / TileSize;
Backend.MoveTo (targetX, targetY);
}
public void DoPaint (object source, PaintEventArgs args)