Beispiel #1
0
    void Start()
    {
        ObservableGamePadInput.Instance.OnButtonADownAsObservable
        .Where(x => IsNewController(x))
        .Subscribe(x => _model.AddPlayer(x))
        .AddTo(this.gameObject);

        ObservableGamePadInput.Instance.OnStartButtonDownAsObservable
        .Where(x => x == 1)
        .Where(x => _model.PlayerCount > 1)
        .Subscribe(_ => {
            _model.SavePlayerIDList();
            MySceneManager.GoToMainGame();
        });
    }