Example #1
0
        public GamePresenter()
        {
            _CurrentGame.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_CurrentGame_PropertyChanged);
            _CurrentGame.Timer = new WPFPacmanTimer();
            if (!System.ComponentModel.DesignerProperties.IsInDesignTool)
            {
            #if (DEBUG)
            #else
                 //HACK BUG VS Designer
                protector = Protect.getInstance();
                protector.Tick += new EventHandler(RegistrationChanged);
            #endif
                demoTimer = new DispatcherTimer();
                demoTimer.Interval = TimeSpan.FromMinutes(1);
                demoTimer.Tick += new EventHandler(GameOverTick);
                fCanPlay = true;
                checkRegister();
            }

            _pacman = new PacmanPresenter(CurrentGame);
            _pacman.xyList = new TXYPresenter(CurrentGame.taskBox);
            _BonusPresenter = new BonusPresenter(CurrentGame);
            for (int i = 0; i < 4; i++)
                _ghosts[i] = new GhostPresenter(CurrentGame, i);
        }
Example #2
0
        public GamePresenter()
        {
            _CurrentGame.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_CurrentGame_PropertyChanged);
            _CurrentGame.Timer            = new WPFPacmanTimer();
            if (!System.ComponentModel.DesignerProperties.IsInDesignTool)
            {
#if (DEBUG)
#else
                //HACK BUG VS Designer
                protector       = Protect.getInstance();
                protector.Tick += new EventHandler(RegistrationChanged);
#endif
                demoTimer          = new DispatcherTimer();
                demoTimer.Interval = TimeSpan.FromMinutes(1);
                demoTimer.Tick    += new EventHandler(GameOverTick);
                fCanPlay           = true;
                checkRegister();
            }

            _pacman         = new PacmanPresenter(CurrentGame);
            _pacman.xyList  = new TXYPresenter(CurrentGame.taskBox);
            _BonusPresenter = new BonusPresenter(CurrentGame);
            for (int i = 0; i < 4; i++)
            {
                _ghosts[i] = new GhostPresenter(CurrentGame, i);
            }
        }