♪♫ Wer will lustige Schweifklammern sehn, der muss ins inf3 praktikum geh'n ♫ ♪

This commit is contained in:
2014-05-16 11:48:38 +02:00
parent c46f6bf743
commit daa6a572d0
2 changed files with 8 additions and 5 deletions

View File

@@ -176,8 +176,9 @@ namespace WorldOfPeacecraft
public void MoveStep () public void MoveStep ()
{ {
if (Pathwalker.HasMoreSteps()) if (Pathwalker.HasMoreSteps ()) {
SenderBuffer.AddLine("ask:" + Pathwalker.NextStep()); SenderBuffer.AddLine ("ask:" + Pathwalker.NextStep ());
}
} }
public void OnPlayerMoved (int x, int y) public void OnPlayerMoved (int x, int y)

View File

@@ -30,11 +30,13 @@ namespace WorldOfPeacecraft
public override void SetPos (int x, int y) public override void SetPos (int x, int y)
{ {
bool positionChanged = false; bool positionChanged = false;
if (x != GetX() || y != GetY ()) if (x != GetX () || y != GetY ()) {
positionChanged = true; positionChanged = true;
}
base.SetPos (x, y); base.SetPos (x, y);
if (positionChanged && LocationChanged != null) if (positionChanged && LocationChanged != null) {
LocationChanged(x, y); LocationChanged (x, y);
}
} }
public override string ToString() public override string ToString()