added Gridinfo

This commit is contained in:
j.mei7
2022-03-09 19:02:26 +01:00
parent 5a680495ce
commit 25ce88501d
7 changed files with 59 additions and 19 deletions

View File

@@ -1,16 +1,4 @@
/*
------------------- Code Monkey -------------------
Thank you for downloading this package
I hope you find it useful in your projects
If you have any questions let me know
Cheers!
unitycodemonkey.com
--------------------------------------------------
*/
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

View File

@@ -13,9 +13,9 @@ public class Pathfinding {
private List<PathNode> openList;
private List<PathNode> closedList;
public Pathfinding(int width, int height) {
public Pathfinding(int width, int height, float cellSize) {
Instance = this;
grid = new Grid<PathNode>(width, height, 1f, Vector3.zero, (Grid<PathNode> g, int x, int y) => new PathNode(g, x, y));
grid = new Grid<PathNode>(width, height, cellSize, Vector3.zero, (Grid<PathNode> g, int x, int y) => new PathNode(g, x, y));
}
public Grid<PathNode> GetGrid() {