Exemplo n.º 1
0
        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();
            }));
        }