Exemplo n.º 1
0
        public GhostManager(Game game, PacMan.MonogamePacMan pac)
            : base(game)
        {
            this.pac = pac;
            Ghosts   = new List <MonogameGhost>();
            r        = new Random(System.DateTime.Now.Millisecond);

            input   = (InputHandler)game.Services.GetService(typeof(IInputHandler));
            console = (GameConsole)game.Services.GetService(typeof(IGameConsole));
        }
Exemplo n.º 2
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            input   = new InputHandler(this);
            console = new GameConsole(this);

            this.Components.Add(input);
            this.Components.Add(console);

            pac = new PacMan.MonogamePacMan(this);
            this.Components.Add(pac);



            ghostManager = new GhostManager(this, pac);
            this.Components.Add(ghostManager);
        }