Ejemplo n.º 1
0
        public void Clear()
        {
            var tmp = MapsManager.FromId(MapId);

            tmp.Cells.ForEachWithIndex((cellData, index) =>
            {
                var cell  = GetCell(index);
                cell.Text = cell.Id.ToString();
                if (cellData.Los)
                {
                    cell.State = CellState.NonWalkable;
                }
                if (cellData.Mov)
                {
                    cell.State = CellState.Walkable;
                }
            });
            Invalidate();
        }
Ejemplo n.º 2
0
        public void Init(int mapId)
        {
            MapId = mapId;

            var tmp = MapsManager.FromId(MapId);

            tmp.Cells.ForEachWithIndex((cellData, index) =>
            {
                var cell  = GetCell(index);
                cell.Text = cell.Id.ToString();
                if (cellData.Los)
                {
                    cell.State = CellState.NonWalkable;
                }
                if (cellData.Mov)
                {
                    cell.State = CellState.Walkable;
                }
            });
            Invalidate();

            WPath = new WorldPathfinder(MapsManager.FromId(MapId), this);
        }