Beispiel #1
0
 public void Change(PanelController prefab)
 {
     if (this.root != null)
     {
         this.root.OnPanelOut()
         .Take(1)
         .SubscribeWithState2(this, prefab, (_, _this, p) =>
         {
             Destroy(_this.root.gameObject);
             _this.root = _this.CreatePanel(p);
             _this.root.OnPanelIn();
         })
         .AddTo(this);
     }
     else
     {
         this.root = this.CreatePanel(prefab);
         this.root.OnPanelIn();
     }
 }
Beispiel #2
0
 protected override UniRx.IObservable <Unit> InternalOnPanelIn()
 {
     this.root = this.CreatePanel(this.initialPanel);
     return(this.root.OnPanelIn());
 }