//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; }
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")); }
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()); }
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()); }
private void Start() { modalRegistrar = FindObjectOfType <OpenModal>(); }