private void SnapToGrid() { int gridSize = _waypoint.GetGridSize(); transform.position = new Vector3( _waypoint.GetGridPos().x *gridSize, 0f, _waypoint.GetGridPos().y *gridSize ); }
protected void ExploreNeighbours() { if (!isRunning) { return; } foreach (Vector2Int direction in directions) { Vector2Int neighbourCoordinates = searchCenter.GetGridPos() + direction; if (grid.ContainsKey(neighbourCoordinates)) { AddNewNeighbours(neighbourCoordinates); } } }