ArkaliaCore.Game.Game.Engines.PathEngine.LoadMoves C# (CSharp) Метод

LoadMoves() публичный Метод

Load moves from a string
public LoadMoves ( string path ) : void
path string
Результат void
        public void LoadMoves(string path)
        {
            for (int i = 0; i <= path.Length - 1; i += 3)
            {
                try
                {
                    string node = path.Substring(i, 3);
                    string dirchar = node[0].ToString();
                    string cellChar = node.Substring(1);

                    int dir = GetDirNum(dirchar);
                    int cell = GetCellNum(cellChar);

                    if (cell > 0)
                    {
                        this._cells.Add(new Pathfinding.PathNode(cell, dir));
                    }
                }
                catch (Exception e)
                {
                    Utilities.Logger.Error("Can't parse moves : " + e.Message);
                    break;
                }
            }
        }