Пример #1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// </summary>
        protected override void Initialize()
        {
            // Initialize window
            GraphicsInitialization();

            this.map = new Map(this);

            pathfinder = new Pathfinder(map);
            Stack<Vector2> path = pathfinder.FindPath(new Point(0, 0), map, new Point(12, 26));

            foreach (Vector2 point in path)
            {
                System.Diagnostics.Debug.WriteLine(point);
            }

            zombie = new DrawableObject(this, Vector2.Zero);
            zombie.Path = path;

            base.Initialize();
        }
Пример #2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// </summary>
        protected override void Initialize()
        {
            // Initialize window
            GraphicsInitialization();

            this.map = new Map(this);

            pathfinder = new Pathfinder(map);
            Stack <Vector2> path = pathfinder.FindPath(new Point(0, 0), map, new Point(12, 26));

            foreach (Vector2 point in path)
            {
                System.Diagnostics.Debug.WriteLine(point);
            }

            zombie      = new DrawableObject(this, Vector2.Zero);
            zombie.Path = path;

            base.Initialize();
        }