// Token: 0x060020B4 RID: 8372 RVA: 0x0004DDF6 File Offset: 0x0004CDF6 public static bool Parse(string str, out ExitPath value) { if (ExitPathConverter.typeMap.TryGetValue(str, out value)) { return(true); } value = ExitPath.ExitToFreeroam; return(false); }
private static void FindPath(Tile tile, int[,] tiles, List <Tile> path, Tile prevTile) { if (isPathFound) { return; } ExitPath tempPath = new ExitPath(); tempPath.path = path.ToList(); tempPath.path.Add(tile); paths.Add(tempPath); counter++; int[,] tempTiles = tiles.Clone() as int[, ]; tempTiles[prevTile.Row, prevTile.Col] = 0; // за да не се връща назад if (tile.Row == 0 || tile.Row == TILES.GetLength(0) - 1 || tile.Col == 0 || tile.Col == TILES.GetLength(1) - 1) //в края сме => изход { isPathFound = true; return; } //ако няма път на никъде /*if(tempTiles[tile.Row - 1, tile.Col] == 0 && tempTiles[tile.Row + 1, tile.Col] == 0 && tempTiles[tile.Row, tile.Col - 1] == 0 && tempTiles[tile.Row, tile.Col + 1] == 0) * { * //tempTiles[tile.Row, tile.Col] = 0; * //paths[counter - 1].path.Remove(prevTile); //с нищо не помага, понеже трябва да се изчисти листа до преди няколко функции, когато е тръгнало в това разклонение * //paths[counter - 1].path.Remove(tile); * }*/ if (tempTiles[tile.Row, tile.Col + 1] == 1) { FindPath(new Tile(tile.Row, tile.Col + 1), tempTiles, tempPath.path.ToList(), tile); //ако в дясно има път } if (tempTiles[tile.Row, tile.Col - 1] == 1) { FindPath(new Tile(tile.Row, tile.Col - 1), tempTiles, tempPath.path.ToList(), tile); //ако в ляво има път } if (tempTiles[tile.Row - 1, tile.Col] == 1) { FindPath(new Tile(tile.Row - 1, tile.Col), tempTiles, tempPath.path.ToList(), tile); //ако горе има път } if (tempTiles[tile.Row + 1, tile.Col] == 1) { FindPath(new Tile(tile.Row + 1, tile.Col), tempTiles, tempPath.path.ToList(), tile); //ако долу има път } } // край на FindPath()
// Token: 0x06001223 RID: 4643 RVA: 0x0001A35C File Offset: 0x0001935C public CloseOnExitPath(ExitPath exitPath, bool closeOnTimedOut) { this.exitPath = exitPath; this.closeOnTimedOut = closeOnTimedOut; }
// Token: 0x0600025D RID: 605 RVA: 0x0000473E File Offset: 0x0000373E public virtual void SetExitPath(ExitPath exitPath) { InternalLobby._EASharpBinding_236(this.mSelf, (int)exitPath); }