Пример #1
2
 // --- methods --- //
 /// <summary>
 /// Constructor of Inky.
 /// </summary>
 /// <param name="map">The map where Inky evolve.</param>
 /// <param name="pacman">The pacman to chase.</param>
 public Inky(Map map, Pacman pacman, Blinky blinky)
     : base(map, pacman)
 {
     _blinky = blinky;
 }
Пример #2
0
        /// <summary>
        /// Constructor of the game main loop.
        /// </summary>
        public GameLoop()
        {
            Content.RootDirectory = "Content";

            _graphics = new GraphicsDeviceManager(this);
            _graphics.PreferredBackBufferWidth  = 448;
            _graphics.PreferredBackBufferHeight = 576;
            _graphics.ApplyChanges();

            _ghosts = new Ghost[4];

            _map    = new Map(_ghosts);
            _pacman = new Pacman(_map);

            Blinky blinky = new Blinky(_map, _pacman);
            Pinky  pinky  = new Pinky(_map, _pacman);
            Inky   inky   = new Inky(_map, _pacman, blinky);
            Clyde  clyde  = new Clyde(_map, _pacman);

            _ghosts[0] = blinky;
            _ghosts[1] = pinky;
            _ghosts[2] = inky;
            _ghosts[3] = clyde;

            _score              = 0;
            _eatingScore        = 0;
            _life               = 3;
            _level              = 1;
            _ready              = 60 * 4;
            this.IsMouseVisible = true;

            _isOnHomeScreen = true;
            _homeScreen     = new HomeScreen(_score, _highScore);
        }
Пример #3
0
        // --- methods --- //

        /// <summary>
        /// Constructor of Inky.
        /// </summary>
        /// <param name="map">The map where Inky evolve.</param>
        /// <param name="pacman">The pacman to chase.</param>
        public Inky(Map map, Pacman pacman, Blinky blinky)
            : base(map, pacman)
        {
            _blinky = blinky;
        }
Пример #4
0
        /// <summary>
        /// Constructor of the game main loop.
        /// </summary>
        public GameLoop()
        {
            Content.RootDirectory = "Content";

            _graphics = new GraphicsDeviceManager(this);
            _graphics.PreferredBackBufferWidth = 448;
            _graphics.PreferredBackBufferHeight = 576;
            _graphics.ApplyChanges();

            _ghosts = new Ghost[4];

            _map = new Map(_ghosts);
            _pacman = new Pacman(_map);

            Blinky blinky = new Blinky(_map, _pacman);
            Pinky pinky = new Pinky(_map, _pacman);
            Inky inky = new Inky(_map, _pacman, blinky);
            Clyde clyde = new Clyde(_map, _pacman);

            _ghosts[0] = blinky;
            _ghosts[1] = pinky;
            _ghosts[2] = inky;
            _ghosts[3] = clyde;

            _score = 0;
            _eatingScore = 0;
            _life = 3;
            _level = 1;
            _ready = 60 * 4;
            this.IsMouseVisible = true;

            _isOnHomeScreen = true;
            _homeScreen = new HomeScreen(_score, _highScore);
        }