public Queue <Node> CommitWayPointSearch(ADS.Grid.Generation.New.Grid grid, Node Start, Node Goal) { AStarGridSearch search = new AStarGridSearch(grid); search.Search(Start, Goal, Locator.Instance.getService <IResourceLoader>().GetTex("Tile1")); Queue <Node> result = search.getPath(); currentDisp = search; return(result); }
public override void Initialize() { Locator.Instance.getService <CameraManager>().getCam().Zoom = 1f; Locator.Instance.getService <KeyHandler>().KeyDown += OnKeyDown; Locator.Instance.getService <MouseHandler>().MouseClick += OnMouseClick; random = new Random(); search1 = new AstarPath(); grid = new ADS.Grid.Generation.New.Grid(Locator.Instance.getService <IResourceLoader>().GetTex("Tile3")); grid.create(max, max); grid.setNodePositions(max, max); grid.setupVisual(); a = new AStarGridSearch(grid); Locator.Instance.getService <CameraManager>().getCam().Pos = grid.getGrid[0, 0].Position + new Vector2(0, 100); base.Initialize(); }
public AStarGridSearch(ADS.Grid.Generation.New.Grid grid) { this.grid = grid; }