Pathwalker-Klasse (Blatt 7)
This commit is contained in:
@@ -10,16 +10,14 @@ namespace WorldOfPeacecraft
|
||||
public abstract class Entity : IPositionable
|
||||
{
|
||||
public int Id;
|
||||
public int PosX;
|
||||
public int PosY;
|
||||
public Coordinate Coord;
|
||||
public string Desc;
|
||||
public bool Busy;
|
||||
|
||||
public Entity (int id, int posX, int posY, string desc, bool busy)
|
||||
{
|
||||
this.SetId (id);
|
||||
this.SetPosX (posX);
|
||||
this.SetPosY (posY);
|
||||
this.SetCoord(new Coordinate(posX, posY));
|
||||
this.SetDesc (desc);
|
||||
this.SetBusy (busy);
|
||||
}
|
||||
@@ -36,22 +34,27 @@ namespace WorldOfPeacecraft
|
||||
|
||||
public void SetPosX (int x)
|
||||
{
|
||||
this.PosX = x;
|
||||
this.Coord.X = x;
|
||||
}
|
||||
|
||||
public int getXPosition ()
|
||||
{
|
||||
return PosX;
|
||||
return Coord.X;
|
||||
}
|
||||
|
||||
public void SetPosY (int y)
|
||||
{
|
||||
this.PosY = y;
|
||||
this.Coord.Y = y;
|
||||
}
|
||||
|
||||
public int getYPosition ()
|
||||
{
|
||||
return PosY;
|
||||
return Coord.Y;
|
||||
}
|
||||
|
||||
public void SetCoord (Coordinate coord)
|
||||
{
|
||||
this.Coord = coord;
|
||||
}
|
||||
|
||||
public void SetDesc (string desc)
|
||||
|
||||
Reference in New Issue
Block a user