private void Start() { pathfinding = new Pathfinding(GRID_X, GRID_Y); pathfindingDebugStepVisual.Setup(pathfinding.GetGrid()); pathfindingVisual.SetGrid(pathfinding.GetGrid()); grid = pathfinding.GetGrid(); }
private void Start() { pathfindingGrid = new Grid <GridNode>(gridSize.x, gridSize.y, 1f, Vector3.zero, (Grid <GridNode> grid, int x, int y) => new GridNode(grid, x, y)); pathfindingGrid.GetGridObject(2, 0).SetIsWalkable(false); pathfindingVisual.SetGrid(pathfindingGrid); }
// Start is called before the first frame update void Start() { pathfinding = new Pathfinding(width: gridSize.x, height: gridSize.y, startPosition: Vector2Int.zero, debugGrid: debugGrid); if (pathfindingDebugVisual != null) { pathfindingDebugVisual.Setup(pathfinding.Grid); } if (pathfindingVisual != null) { pathfindingVisual.SetGrid(pathfinding.Grid); } }
// Start is called before the first frame update void Start() { // intro fade animation Fade.gameObject.SetActive(true); Fade.Play("Black"); // advance mode AdvanceMode.interactable = GameData.instance.isAdvanceModeUnlocked(); // start menu coroutine StartCoroutine(Init()); instance = this; // mute npcs GameData.instance.muteFX = true; // set menus active MainMenu.SetActive(true); PlayMenu.SetActive(false); SettingsMenu.SetActive(false); Credits.SetActive(false); // load data from GameData width = GameData.instance.menuGridWidth; height = GameData.instance.menuGridHeight; Vector3 origin = GameData.instance.menuGridOrigin; worldCamera = Camera.main; pathfinding = new Pathfinding(width, height, origin); grid = pathfinding.GetGrid(); GameData.instance.LoadMenuWalkableTiles(); if (GameData.instance.devTools) { grid.DrawGrid(); pathfindingVisual.SetGrid(grid); } }
private void Start() { iniciargrilla(20, 10); //pathfindingDebugStepVisual.Setup(grilla); pathfindingVisual.SetGrid(grilla); pathfindingVisual1.SetGrid(grilla); pathfindingVisual2.SetGrid(grilla); pathfindingVisual3.SetGrid(grilla); pathfindingVisual4.SetGrid(grilla); pathfindingVisual5.SetGrid(grilla); pathfindingVisualP.SetGrid(grilla); pathfindingVisualP1.SetGrid(grilla); pathfindingVisualP2.SetGrid(grilla); pathfindingVisualP3.SetGrid(grilla); StartNode = grilla.GetGridObject(0, 0); VecindadValida = new List <CasillaNodo>(); // casillas de la vecindad que puede visitar SegurosSinVisitar = new List <CasillaNodo> { StartNode }; // casillas seguras posibles sin visitar CaminosVisitados = new List <CasillaNodo>(); NodoActual = grilla.GetGridObject(0, 0); NodoActual.CrearPosible(-1); }
private void Start() { player = GameObject.Find("Player");; pathfinding = new Pathfinding(10, 10); pathfindingVisual.SetGrid(pathfinding.GetGrid()); }
private void Start() { pathfinding = new PathFinding(10, 10); pathfindingVisual.SetGrid(pathfinding.GetGrid()); }
private void Start() { pathfinding = new Pathfinding(20, 10); pathfindingDebugStepVisual.Setup(pathfinding.GetGrid()); pathfindingVisual.SetGrid(pathfinding.GetGrid()); }
private void Awake() { pathfinding = new Pathfinding(width, height); pathfindingDebugStepVisual.Setup(pathfinding.GetGrid()); pathfindingVisual.SetGrid(pathfinding.GetGrid()); }
private void Start() { _pathfinding = new Pathfinding(gridX, gridY, cellSize); _pathfindingDebugStepVisual.Setup(_pathfinding.GetGrid()); _pathfindingVisual.SetGrid(_pathfinding.GetGrid()); }
private void Start() { pathfinding = new AStar_PathFinder(20, 10); pathfindingDebugStepVisual.Setup(pathfinding.GetGrilla()); pathfindingVisual.SetGrid(pathfinding.GetGrilla()); }
//Create our map of nodes void Start() { pathfinding = new Pathfinding(gridSize, gridSize); pathfindingVisual.SetGrid(pathfinding.GetMap()); }