Files
inf3/src/Tile.cs

108 lines
1.5 KiB
C#

using System;
using Frontend;
namespace WorldOfPeacecraft
{
public class Tile : ITile
{
public int X;
public int Y;
public Entity Entity;
public bool Walkable;
public bool Wall;
public bool Forest;
public bool Huntable;
public bool Water;
public Tile (int posX, int posY, bool walkable, bool wall, bool forest, bool huntable, bool water)
{
this.SetX (posX);
this.SetY (posY);
this.SetWalkable (walkable);
this.SetWall(wall);
this.SetForest (forest);
this.SetHuntable (huntable);
this.SetWater (water);
}
public void SetX (int x)
{
this.X = x;
}
public int GetX ()
{
return X;
}
public void SetY (int y)
{
this.Y = y;
}
public int GetY ()
{
return Y;
}
public void SetEntity (Entity entity)
{
this.Entity = entity;
}
public Entity GetEntity ()
{
return Entity;
}
public void SetWalkable (bool walkable)
{
this.Walkable = walkable;
}
public bool IsWalkable ()
{
return Walkable;
}
public void SetWall(bool wall)
{
this.Wall = wall;
}
public bool IsWall()
{
return Wall;
}
public void SetForest (bool forest)
{
this.Forest = forest;
}
public bool IsForest ()
{
return Forest;
}
public void SetHuntable (bool huntable)
{
this.Huntable = huntable;
}
public bool IsHuntable ()
{
return Huntable;
}
public void SetWater (bool water)
{
this.Water = water;
}
public bool IsWater ()
{
return Water;
}
}
}