예제 #1
0
    //public OpenKeypad openKeypad;

    void Start()
    {
        numPad                      = transform.GetChild(0).GetChild(0).GetChild(2).gameObject;
        displayText                 = transform.GetChild(0).GetChild(0).GetChild(1).GetChild(0).GetComponentInChildren <Text>();
        displayText.text            = string.Empty;
        _input                      = string.Empty;
        openKeypad                  = GameObject.Find("OpenKeypad").GetComponent <OpenModal>();
        buttonPress                 = GetComponent <AudioSource>();
        GameController.FinishModal += DeactivateKeypad;
    }
예제 #2
0
        public HomeViewModel(IViewStackService viewStackService) : base(viewStackService)
        {
            OpenModal = ReactiveCommand
                        .CreateFromObservable(() =>
                                              this.ViewStackService.PushModal(new FirstModalViewModel(ViewStackService)),
                                              outputScheduler: RxApp.MainThreadScheduler);

            PushPage = ReactiveCommand
                       .CreateFromObservable(() =>
                                             this.ViewStackService.PushPage(new RedViewModel(ViewStackService)),
                                             outputScheduler: RxApp.MainThreadScheduler);

            OpenModal.Subscribe(x => Debug.WriteLine("PagePushed"));
        }
예제 #3
0
        public FirstModalViewModel(IViewStackService viewStackService) : base(viewStackService)
        {
            OpenModal = ReactiveCommand
                        .CreateFromObservable(() =>
                                              this.ViewStackService.PushModal(new SecondModalViewModel(viewStackService)),
                                              outputScheduler: RxApp.MainThreadScheduler);

            PopModal = ReactiveCommand
                       .CreateFromObservable(() =>
                                             this.ViewStackService.PopModal(),
                                             outputScheduler: RxApp.MainThreadScheduler);

            OpenModal.Subscribe(x => Debug.WriteLine("PagePushed"));
            PopModal.Subscribe(x => Debug.WriteLine("PagePoped"));
            PopModal.ThrownExceptions.Subscribe(error => Interactions.ErrorMessage.Handle(error).Subscribe());
        }
예제 #4
0
        public FirstModalViewModel(INavigationService navigationService) : base(navigationService)
        {
            OpenModal = ReactiveCommand
                        .CreateFromObservable(() =>
                                              NavigationService.PushModal(new SecondModalViewModel(NavigationService)),
                                              outputScheduler: RxApp.MainThreadScheduler);

            PopModal = ReactiveCommand
                       .CreateFromObservable(() =>
                                             NavigationService.PopModal(),
                                             outputScheduler: RxApp.MainThreadScheduler);

            OpenModal.Subscribe(x => System.Diagnostics.Debug.WriteLine("PagePushed"));
            PopModal.Subscribe(x => System.Diagnostics.Debug.WriteLine("PagePopped"));
            PopModal.ThrownExceptions.Subscribe(error => Interactions.ErrorMessage.Handle(error).Subscribe());
        }
예제 #5
0
 private void Start()
 {
     modalRegistrar = FindObjectOfType <OpenModal>();
 }