Exemple #1
0
        public void StartGame(Profile profile)
        {
            var matchedAccounts = _profileAccountsGetter.GetAccountsForProfile(profile, GlobalConfig.Accounts.ToArray());

            // If no accounts then just start the game
            if (matchedAccounts.Length == 0)
            {
                _gameStarter.Start(profile, GlobalConfig, null);
                return;
            }

            // Otherwise select account
            _navigationServices.Main.NavigateToViewModel <SelectAccountViewModel>(new Dictionary <string, object>
            {
                [nameof(SelectAccountViewModel.Accounts)]        = matchedAccounts,
                [nameof(SelectAccountViewModel.OnAccountSelect)] =
                    (Action <Account>)(account => _gameStarter.Start(profile, GlobalConfig, account))
            });
        }
 public void StartGame(Profile profile)
 {
     _gameStarter.Start(profile, _gameConfig);
 }