Wegfindung wird jetzt ausgeführt, wenn auf ein Feld auf der Karte geklickt wird
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user