Files
inf3/src/Entity.cs

82 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorldOfPeacecraft
{
public abstract class Entity : IEntity
{
public int Id;
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.SetCoord(new Coordinate(posX, posY));
this.SetDesc (desc);
this.SetBusy (busy);
}
public void SetId (int id)
{
this.Id = id;
}
public int GetId ()
{
return Id;
}
public void SetX (int x)
{
this.Coord.X = x;
}
public int GetX ()
{
return Coord.X;
}
public void SetPos (int x, int y)
{
SetX (x);
SetY (y);
}
public void SetY (int y)
{
this.Coord.Y = y;
}
public int GetY ()
{
return Coord.Y;
}
public void SetCoord (Coordinate coord)
{
this.Coord = coord;
}
public void SetDesc (string desc)
{
this.Desc = desc;
}
public void SetBusy (bool busy)
{
this.Busy = busy;
}
public bool GetBusy ()
{
return Busy;
}
}
}