コード例 #1
0
ファイル: ThrowSummaryScreen.cs プロジェクト: nymo1/XDarts
        public ThrowSummaryScreen(BaseModeScreen gameplayScreen)
            : base("Throw Summary")
        {
            _gameplayScreen = gameplayScreen;
            _back.OnSelected += back_OnSelected;

            MenuItems.AddItems(_back);
            MenuPosition.Y = 0.8f;
        }
コード例 #2
0
ファイル: PauseMenuScreen.cs プロジェクト: nymo1/XDarts
        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);
        }