public Vector3 SetToPosition(int id, OnMapType objectToMove, Point position)
    {
        var tile     = new Vector3Int(position.X, position.Y, 0);
        var worldPos = _baseLayer.GetCellCenterWorld(tile);

        MapDatas[position.X][position.Y].Type     = objectToMove;
        MapDatas[position.X][position.Y].EntityId = id;
        return(worldPos);
    }
    public Vector3 MoveToPosition(int id, OnMapType objectToMove, Point from, Point to)
    {
        var tile     = new Vector3Int(to.X, to.Y, 0);
        var worldPos = _baseLayer.GetCellCenterWorld(tile);

        MapDatas[from.X][from.Y].Type     = OnMapType.Empty;
        MapDatas[from.X][from.Y].EntityId = null;
        MapDatas[to.X][to.Y].Type         = objectToMove;
        MapDatas[to.X][to.Y].EntityId     = id;
        return(worldPos);
    }
 public MovementComponent(Point point, OnMapType mapType)
 {
     Position = point;
     MapType  = mapType;
 }
 public PositionComponent(Point p, OnMapType type)
 {
     Position = p;
 }
 public void SetMapData(Point point, OnMapType type)
 {
     MapDatas[point.X][point.Y].Type     = type;
     MapDatas[point.X][point.Y].EntityId = null;
 }
 public bool HasEnemy(Point p, OnMapType enemy)
 {
     return(IsInBounds(p) && MapDatas[p.X][p.Y].Type == enemy);
 }