♪♫ 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

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