Ejemplo n.º 1
0
        public Pathfinding()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            #if WINDOWS_PHONE
            // Frame rate is 30 fps by default for Windows Phone.
            TargetElapsedTime = TimeSpan.FromTicks(333333);
            graphics.IsFullScreen = true;
            #endif

            map = new Map();
            tank = new Tank();
            pathFinder = new PathFinder();
        }
Ejemplo n.º 2
0
 public void Initialize(Map mazeMap)
 {
     location = Vector2.Zero;
     destination = location;
     map = mazeMap;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Setup search
 /// </summary>
 /// <param name="mazeMap">Map to search</param>
 public void Initialize(Map mazeMap)
 {
     searchStatus = SearchStatus.Stopped;
     openList = new List<SearchNode>();
     closedList = new List<SearchNode>();
     paths = new Dictionary<Point, Point>();
     map = mazeMap;
 }