示例#1
0
        public ZYDifficultMode(ViewManager viewManager) : base(viewManager)
        {
            _sideBar     = new ZYSideBar(_viewManager);
            _servingArea = new ZYServingAreaDifficult();

            _btmBar = new ZYBottomBar();

            _giveUpButton = new ZYButton("blue_button07.png");
            _giveUpButton.SetWidth(80);
            _giveUpButton.SetHeight(80);
            _giveUpButton.SetText("Exit", 35);

            //Register for Observer Pattern
            foreach (ZYDiningTable diningTable in _servingArea.DiningTable)
            {
                diningTable.RegisterSideBar(_sideBar);
            }
            _btmBar.RegisterStove(_servingArea.Stoves);
            _servingArea.Player.RegisterHoldingFrame(_sideBar.HoldingFoodFrame);
            //

            //initiate new BlUE status bar
            _statusBar = new ZYStatusBar("blackprogressbar.png");
            _statusBar.SetFillingImage("blueprogressbar.png");
            //
        }
        public ZYMediumMode(ViewManager viewManager) : base(viewManager)
        {
            _sideBar     = new EasyModeSideBar(_viewManager);
            _servingArea = new ZYServingAreaMedium();

            _btmBar = new ZYBottomBar();

            _giveUpButton = new ZYButton("pauseButton.png");
            _giveUpButton.SetWidth(80);
            _giveUpButton.SetHeight(80);
            _giveUpButton.SetText("Pause", 20);

            //Register for Observer Pattern
            foreach (ZYDiningTable diningTable in _servingArea.DiningTable)
            {
                diningTable.RegisterSideBar(_sideBar);
            }
            _btmBar.RegisterStove(_servingArea.Stoves);
            _servingArea.Player.RegisterHoldingFrame(_sideBar.HoldingFoodFrame);
            //

            //initiate _gameTime
            _gameTime = SwinGame.CreateTimer();
            SwinGame.StartTimer(_gameTime);

            //initiate new BlUE status bar
            _statusBar = new ZYStatusBar("blackprogressbar.png");
            _statusBar.SetFillingImage("blueprogressbar.png");
            //
        }