示例#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
文件: Game1.cs 项目: Nachev/Telerik
        /// <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();
        }