Exemple #1
0
        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);
        }
Exemple #2
0
        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();
        }
Exemple #3
0
 public AStarGridSearch(ADS.Grid.Generation.New.Grid grid)
 {
     this.grid = grid;
 }