Example #1
0
        public ThrowSummaryScreen(BaseModeScreen gameplayScreen)
            : base("Throw Summary")
        {
            _gameplayScreen = gameplayScreen;
            _back.OnSelected += back_OnSelected;

            MenuItems.AddItems(_back);
            MenuPosition.Y = 0.8f;
        }
Example #2
0
        public PauseMenuScreen(BaseModeScreen gameplayScreen)
            : base("Game Paused")
        {
            _gameModeScreen = gameplayScreen;

            _return.OnSelected += (sender, args) => CancelScreen();

            //Check if there is a dart that we can remove
            if (!gameplayScreen.Mode.Players.Any(x => x.Rounds.Any(y => y.Darts.Any())))
            {
                _unthrow.Enabled = false;
            }

            _unthrow.OnSelected += Unthrow_OnSelected;
            _summary.OnSelected += Summary_OnSelected;
            _options.OnSelected += Options_OnSelected;
            _quit.OnSelected += Quit_OnSelected;
            _help.OnSelected += Help_OnSelected;

            MenuItems.AddItems(_return, _unthrow, _summary, _options, _help, _quit);
        }