コード例 #1
0
 public static ControlProfile GetDefaultProfile(DefaultProfiles profile)
 {
     switch (profile) {
     case DefaultProfiles.P1:
         return new ControlProfile(KeyCode.W, KeyCode.S, KeyCode.A, KeyCode.D, KeyCode.E, KeyCode.Q);
     case DefaultProfiles.P2:
         return new ControlProfile(KeyCode.UpArrow, KeyCode.DownArrow, KeyCode.LeftArrow, KeyCode.RightArrow, KeyCode.O, KeyCode.I);
     default:
         Debug.Log("Non-implemented Controlfile '" + profile.ToString() + "'... see file ControlProfile.cs, function GetDefaultProfile");
         break;
     }
     return null;
 }
コード例 #2
0
    public CoinJoinProfilesViewModel(KeyManager keyManager, bool isNewWallet)
    {
        NextCommand = ReactiveCommand.Create(() => OnNext(keyManager, isNewWallet));
        EnableBack  = true;

        AutoCoinJoin = keyManager.AutoCoinJoin;

        Profiles = DefaultProfiles.ToList();

        ManualSetupCommand = ReactiveCommand.CreateFromTask(async() => await OnManualSetupAsync());

        if (isNewWallet)
        {
            _selectedProfile = Profiles[1];
            return;
        }

        _selectedProfile = IdentifySelectedProfile(keyManager);
    }