private void StartADV() { Debug.Log((object)"Opening:StartADV"); if (Object.op_Equality((Object)this._player, (Object)null)) { return; } AgentActor tutorialAgent = Singleton <Manager.Map> .Instance.TutorialAgent; this._player.CommCompanion = (Actor)tutorialAgent; this._player.PlayerController.ChangeState("Communication"); if (!Object.op_Inequality((Object)tutorialAgent, (Object)null)) { return; } Transform transform = ((Component)this._player.CameraControl.CameraComponent).get_transform(); tutorialAgent.SetLookPtn(1, 3); tutorialAgent.SetLookTarget(1, 0, transform); this.openData.FindLoad("0", tutorialAgent.AgentData.param.charaID, 100); this.packData = new OpeningWakeUp.PackData(); this.packData.Init(); this.packData.SetParam((IParams)tutorialAgent.AgentData, (IParams)this._player.PlayerData); this.packData.onComplete = (System.Action)(() => { this.EndADV(); this.packData.Release(); this.packData = (OpeningWakeUp.PackData)null; }); ObservableExtensions.Subscribe <long>(Observable.DelayFrame <long>(Observable.Take <long>(Observable.SkipWhile <long>(Observable.Skip <long>((IObservable <M0>)Observable.EveryUpdate(), 1), (Func <M0, bool>)(_ => this._player.CameraControl.CinemachineBrain.get_IsBlending())), 1), 5, (FrameCountType)0), (System.Action <M0>)(_ => Singleton <MapUIContainer> .Instance.OpenADV(this.openData, (IPack)this.packData))); }
private void EndADV() { Debug.Log((object)"Opening:EndADV"); AgentActor tutorialAgent = Singleton <Manager.Map> .Instance.TutorialAgent; if (Object.op_Inequality((Object)tutorialAgent, (Object)null)) { tutorialAgent.ClearItems(); ((Component)this._player.CameraControl.CameraComponent).get_transform(); tutorialAgent.SetLookPtn(0, 3); tutorialAgent.SetLookTarget(0, 0, (Transform)null); } MapUIContainer.SetVisibleHUD(true); if (this._player.CameraControl.ShotType == ShotType.PointOfView) { this._player.CameraControl.XAxisValue = (float)this._player.Rotation.y; this._player.CameraControl.YAxisValue = 0.5f; } else { ActorCameraControl cameraControl = this._player.CameraControl; Quaternion rotation = this._player.Rotation; double num = ((Quaternion) ref rotation).get_eulerAngles().y - 30.0; cameraControl.XAxisValue = (float)num; this._player.CameraControl.YAxisValue = 0.6f; } SoundPlayer instance1 = Singleton <SoundPlayer> .Instance; instance1.StartAllSubscribe(); instance1.ActivateWideEnvSE(true); this._player.CameraControl.Mode = CameraMode.Normal; Manager.Map.SetTutorialProgress(1); this._player.PlayerController.ChangeState("Idle"); this._agent.ChangeTutorialBehavior(AIProject.Definitions.Tutorial.ActionType.HeadToSandBeach); MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception); ObservableExtensions.Subscribe <long>(Observable.DelayFrame <long>(Observable.Take <long>(Observable.SkipWhile <long>(Observable.Skip <long>((IObservable <M0>)Observable.EveryUpdate(), 1), (Func <M0, bool>)(_ => this._player.CameraControl.CinemachineBrain.get_IsBlending())), 1), 5, (FrameCountType)0), (System.Action <M0>)(_ => { this._player.PlayerController.ChangeState("Normal"); if (Singleton <MapScene> .IsInstance()) { MapScene instance2 = Singleton <MapScene> .Instance; instance2.SaveProfile(true); instance2.SaveProfile(false); } if (!Singleton <Game> .IsInstance()) { return; } Singleton <Game> .Instance.SaveGlobalData(); })); }
protected override void OnBeforeStart() { DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x))), (Component)this); DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <string>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this._numInputField), (Action <M0>)(str => this.OnInputFieldValueChanged(str))), (Component)this); for (int index = 0; index < this._numChangeValues.Length; ++index) { Button element = this._numChangeButtons.GetElement <Button>(index); if (!Object.op_Equality((Object)element, (Object)null)) { int changeValue = this._numChangeValues[index]; DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(element), (Action <M0>)(_ => this.OnNumChangeClick(changeValue))), (Component)this); DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(element), (Action <M0>)(_ => this._recyclingUI.PlaySE(SoundPack.SystemSE.OK_S))), (Component)this); } } if (!this._buttons.IsNullOrEmpty <Button>()) { foreach (Button button in this._buttons) { if (!Object.op_Equality((Object)button, (Object)null)) { DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(button), (Action <M0>)(_ => this._recyclingUI.PlaySE(SoundPack.SystemSE.OK_S))), (Component)this); } } } DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>((IObservable <M0>) this.ClickDelete, (Action <M0>)(_ => this.OnClickDeleteButton())), (Component)this); DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <RecyclingInventoryFacadeViewer>(Observable.Where <RecyclingInventoryFacadeViewer>(Observable.Where <RecyclingInventoryFacadeViewer>((IObservable <M0>) this._recyclingUI.OnInventoryChanged, (Func <M0, bool>)(_ => this.ItemInfo.Item5 == 1)), (Func <M0, bool>)(_ => this.ItemInfo.Item2 != null)), (Action <M0>)(receiver => this.ItemInfo.Item2 = (__Null)receiver.ListController)), (Component)this); IObservable <Unit> observable1 = (IObservable <Unit>)Observable.Select <RecyclingInventoryFacadeViewer, Unit>((IObservable <M0>) this._recyclingUI.OnInventoryChanged, (Func <M0, M1>)(_ => Unit.get_Default())); IObservable <Unit> observable2 = (IObservable <Unit>)Observable.Select <StuffItem, Unit>(Observable.Where <StuffItem>(Observable.Where <StuffItem>(Observable.Where <StuffItem>(Observable.Where <StuffItem>(Observable.Where <StuffItem>((IObservable <M0>) this._recyclingUI.DecidedItemSlotUI.DeleteEvent, (Func <M0, bool>)(_ => this.ItemInfo.Item5 == 1)), (Func <M0, bool>)(_ => Object.op_Inequality((Object)this.ItemInfo.Item3, (Object)null))), (Func <M0, bool>)(item => item != null)), (Func <M0, bool>)(item => ((ItemNodeUI)this.ItemInfo.Item3).Item == item)), (Func <M0, bool>)(item => 0 < item.Count)), (Func <M0, M1>)(_ => Unit.get_Default())); IObservable <Unit> observable3 = (IObservable <Unit>)Observable.Select <StuffItem, Unit>(Observable.Where <StuffItem>(Observable.Where <StuffItem>((IObservable <M0>) this._recyclingUI.DecidedItemSlotUI.DeleteEvent, (Func <M0, bool>)(_ => this.ItemInfo.Item5 == 0)), (Func <M0, bool>)(_ => Object.op_Inequality((Object)this.ItemInfo.Item3, (Object)null))), (Func <M0, M1>)(_ => Unit.get_Default())); IObservable <Unit> observable4 = (IObservable <Unit>)Observable.DelayFrame <Unit>((IObservable <M0>)Observable.Select <PanelType, Unit>(Observable.Where <PanelType>((IObservable <M0>) this._recyclingUI.OnDoubleClicked, (Func <M0, bool>)(_ => Object.op_Inequality((Object)this.ItemInfo.Item3, (Object)null))), (Func <M0, M1>)(_ => Unit.get_Default())), 1, (FrameCountType)0); IObservable <Unit> observable5 = (IObservable <Unit>)Observable.Select <StuffItem, Unit>(Observable.Where <StuffItem>(Observable.Where <StuffItem>(Observable.Where <StuffItem>((IObservable <M0>) this._recyclingUI.CreateItemStockUI.OnAddCreateItem, (Func <M0, bool>)(item => item != null)), (Func <M0, bool>)(_ => this.ItemInfo.Item5 == 2)), (Func <M0, bool>)(_ => Object.op_Inequality((Object)this.ItemInfo.Item3, (Object)null))), (Func <M0, M1>)(_ => Unit.get_Default())); IObservable <Unit> observable6 = (IObservable <Unit>)Observable.DelayFrame <Unit>((IObservable <M0>) this._recyclingUI.CreateItemStockUI.OnClickDeleteSubmit, 1, (FrameCountType)0); DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>(Observable.Merge <Unit>((IObservable <M0>[]) new IObservable <Unit>[9] { (IObservable <Unit>)Observable.DelayFrame <Unit>((IObservable <M0>) this.ClickDecide, 1, (FrameCountType)0), (IObservable <Unit>)Observable.DelayFrame <Unit>((IObservable <M0>) this.ClickReturn, 1, (FrameCountType)0), (IObservable <Unit>)Observable.DelayFrame <Unit>((IObservable <M0>) this.ClickDelete, 1, (FrameCountType)0), observable1, observable3, observable2, observable4, observable5, observable6 }), (Func <M0, bool>)(_ => Object.op_Inequality((Object)this.ItemInfo.Item3, (Object)null))), (Action <M0>)(_ => this.RefreshUI())), (Component)this); DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <StuffItem>(Observable.Where <StuffItem>(Observable.Where <StuffItem>(Observable.Where <StuffItem>(Observable.Where <StuffItem>(Observable.Where <StuffItem>(Observable.Where <StuffItem>(Observable.Where <StuffItem>((IObservable <M0>) this._recyclingUI.DecidedItemSlotUI.DeleteEvent, (Func <M0, bool>)(_ => ((Behaviour)this).get_isActiveAndEnabled())), (Func <M0, bool>)(_ => this.IsActiveControl)), (Func <M0, bool>)(_ => this.ItemInfo.Item5 == 1)), (Func <M0, bool>)(item => item != null)), (Func <M0, bool>)(_ => Object.op_Inequality((Object)this.ItemInfo.Item3, (Object)null))), (Func <M0, bool>)(item => ((ItemNodeUI)this.ItemInfo.Item3).Item == item)), (Func <M0, bool>)(item => item.Count <= 0)), (Action <M0>)(_ => this.DetachItem())), (Component)this); }