Klammersetzung...
This commit is contained in:
@@ -7,7 +7,8 @@ namespace WorldOfPeacecraft
|
||||
public delegate void LocationChangedEventHandler(int x, int y);
|
||||
public event LocationChangedEventHandler LocationChanged;
|
||||
|
||||
public Player (int id, int posX, int posY, string desc, bool busy, int score) : base(id, posX, posY, desc, busy)
|
||||
public Player(int id, int posX, int posY, string desc, bool busy, int score)
|
||||
: base(id, posX, posY, desc, busy)
|
||||
{
|
||||
this.SetScore(score);
|
||||
}
|
||||
@@ -31,11 +32,15 @@ namespace WorldOfPeacecraft
|
||||
{
|
||||
bool positionChanged = false;
|
||||
if (x != GetX() || y != GetY())
|
||||
{
|
||||
positionChanged = true;
|
||||
base.SetPos(x, y);
|
||||
}
|
||||
if (positionChanged && LocationChanged != null)
|
||||
{
|
||||
LocationChanged(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user