Пример #1
0
        private void EndMerchantStory0()
        {
            this._eventPoint.SetDedicatedNumber(1);
            MapUIContainer.SetVisibleHUD(true);
            if (!Singleton <Manager.Map> .IsInstance())
            {
                return;
            }
            Manager.Map instance = Singleton <Manager.Map> .Instance;
            instance.SetActiveMapEffect(true);
            MerchantActor merchant     = instance.Merchant;
            MerchantData  merchantData = merchant.MerchantData;

            if (Object.op_Inequality((Object)merchant, (Object)null))
            {
                if (merchantData != null)
                {
                    merchantData.Unlock = true;
                }
                merchant.SetLookPtn(0, 3);
                merchant.SetLookTarget(0, 0, (Transform)null);
                merchant.ChangeBehavior(merchant.LastNormalMode);
            }
            AgentActor tutorialAgent = instance.TutorialAgent;

            if (Object.op_Inequality((Object)tutorialAgent, (Object)null))
            {
                tutorialAgent.ChangeFirstNormalBehavior();
                instance.TutorialAgent = (AgentActor)null;
                Manager.Map.SetTutorialProgressAndUIUpdate(16);
            }
            PlayerActor player = instance.Player;

            if (Object.op_Inequality((Object)player, (Object)null))
            {
                if (Manager.Config.GraphicData.CharasEntry[0])
                {
                    player.CameraControl.Mode = CameraMode.Normal;
                    player.PlayerController.ChangeState("Idle");
                    ObservableExtensions.Subscribe <long>(Observable.Take <long>(Observable.SkipWhile <long>((IObservable <M0>)Observable.EveryUpdate(), (Func <M0, bool>)(_ => player.CameraControl.CinemachineBrain.get_IsBlending())), 1), (System.Action <M0>)(_ =>
                    {
                        player.AddTutorialUI(Popup.Tutorial.Type.Girl, false);
                        player.PlayerController.ChangeState("Normal");
                    }));
                }
                else
                {
                    player.PlayerController.ChangeState("Idle");
                    Singleton <Manager.Map> .Instance.ApplyConfig((System.Action)(() =>
                    {
                        // ISSUE: cast to a reference type
                        // ISSUE: explicit reference operation
                        CinemachineBlendDefinition.Style prevStyle = (CinemachineBlendDefinition.Style)(^ (CinemachineBlendDefinition&)ref player.CameraControl.CinemachineBrain.m_DefaultBlend).m_Style;
                        // ISSUE: cast to a reference type
                        // ISSUE: explicit reference operation
                        (^ (CinemachineBlendDefinition&)ref player.CameraControl.CinemachineBrain.m_DefaultBlend).m_Style = (__Null)0;
                        player.CameraControl.Mode = CameraMode.Normal;
                        // ISSUE: cast to a reference type
                        // ISSUE: explicit reference operation
                        ObservableExtensions.Subscribe <long>(Observable.Take <long>(Observable.Skip <long>((IObservable <M0>)Observable.EveryLateUpdate(), 1), 1), (System.Action <M0>)(_ => (^ (CinemachineBlendDefinition&)ref player.CameraControl.CinemachineBrain.m_DefaultBlend).m_Style = (__Null)prevStyle));
                    }), (System.Action)(() =>
                    {
                        player.AddTutorialUI(Popup.Tutorial.Type.Girl, false);
                        player.PlayerController.ChangeState("Normal");
                    }));
                }
            }
            Singleton <Manager.Map> .Instance.SetBaseOpenState(-1, true);

            instance.Simulator.EnabledTimeProgression = true;
        }
Пример #2
0
 private void StartMerchantStory0()
 {
     if (!Singleton <Manager.Map> .IsInstance())
     {
         return;
     }
     Manager.Map instance = Singleton <Manager.Map> .Instance;
     this.openData.FindLoad("0", -90, 1);
     this.packData = new CheckEventPointArea.PackData();
     this.packData.Init();
     this.packData.SetParam((IParams)instance.Merchant.MerchantData, (IParams)instance.Player.PlayerData);
     this.packData.onComplete = (System.Action)(() =>
     {
         this.EndMerchantStory0();
         this.packData.Release();
         this.packData = (CheckEventPointArea.PackData)null;
     });
     instance.Player.PlayerController.ChangeState("Idle");
     instance.Merchant.ChangeBehavior(Merchant.ActionType.TalkWithPlayer);
     MapUIContainer.SetVisibleHUD(false);
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)MapUIContainer.FadeCanvas.StartFade(FadeCanvas.PanelType.Blackout, (global::FadeType)0, 2f, true), (System.Action <M0>)(_ => {}), (System.Action)(() =>
     {
         if (!Singleton <Manager.Map> .IsInstance())
         {
             return;
         }
         MapUIContainer.SetVisibleHUD(false);
         PlayerActor player     = Singleton <Manager.Map> .Instance.Player;
         MerchantActor merchant = Singleton <Manager.Map> .Instance.Merchant;
         StoryPoint storyPoint  = Manager.Map.GetStoryPoint(3);
         Transform transform1   = !Object.op_Inequality((Object)storyPoint, (Object)null) ? (Transform)null : ((Component)storyPoint).get_transform();
         if (Object.op_Inequality((Object)transform1, (Object)null))
         {
             GameObject loop = transform1.FindLoop("player_point");
             if (Object.op_Inequality((Object)loop, (Object)null))
             {
                 transform1 = loop.get_transform();
             }
         }
         if (Object.op_Equality((Object)transform1, (Object)null))
         {
             transform1 = Singleton <Manager.Map> .Instance.PlayerStartPoint;
         }
         Transform transform2 = transform1;
         if (Object.op_Inequality((Object)transform2, (Object)null))
         {
             if (((Behaviour)player.NavMeshAgent).get_enabled())
             {
                 player.NavMeshAgent.Warp(transform2.get_position());
             }
             else
             {
                 player.Position = transform2.get_position();
             }
             player.Rotation = transform2.get_rotation();
         }
         AgentActor tutorialAgent = Singleton <Manager.Map> .Instance.TutorialAgent;
         if (Object.op_Inequality((Object)tutorialAgent, (Object)null))
         {
             if (((Behaviour)tutorialAgent.NavMeshAgent).get_enabled())
             {
                 tutorialAgent.NavMeshAgent.Warp(storyPoint.Position);
             }
             else
             {
                 tutorialAgent.Position = storyPoint.Position;
             }
             tutorialAgent.Rotation = storyPoint.Rotation;
             if (tutorialAgent.TutorialType != AIProject.Definitions.Tutorial.ActionType.WaitAtAgit)
             {
                 tutorialAgent.TargetStoryPoint = storyPoint;
                 tutorialAgent.ChangeTutorialBehavior(AIProject.Definitions.Tutorial.ActionType.WaitAtAgit);
             }
         }
         Transform transform3 = ((Component)merchant.Locomotor).get_transform();
         transform3.LookAt(player.Position);
         Vector3 eulerAngles = transform3.get_eulerAngles();
         eulerAngles.x       = (__Null)(double)(eulerAngles.z = (__Null)0.0f);
         transform3.set_eulerAngles(eulerAngles);
         player.CommCompanion = (Actor)merchant;
         player.PlayerController.ChangeState("Communication");
         if (player.CameraControl.ShotType == ShotType.PointOfView)
         {
             ActorCameraControl cameraControl = player.CameraControl;
             Quaternion rotation = player.Rotation;
             // ISSUE: variable of the null type
             __Null y = ((Quaternion) ref rotation).get_eulerAngles().y;
             cameraControl.XAxisValue        = (float)y;
             player.CameraControl.YAxisValue = 0.5f;
         }
         else
         {
             ActorCameraControl cameraControl = player.CameraControl;
             Quaternion rotation             = player.Rotation;
             double num                      = ((Quaternion) ref rotation).get_eulerAngles().y - 30.0;
             cameraControl.XAxisValue        = (float)num;
             player.CameraControl.YAxisValue = 0.6f;
         }
         // ISSUE: cast to a reference type
         // ISSUE: explicit reference operation
         CinemachineBlendDefinition.Style prevStyle = (CinemachineBlendDefinition.Style)(^ (CinemachineBlendDefinition&)ref player.CameraControl.CinemachineBrain.m_DefaultBlend).m_Style;
         // ISSUE: cast to a reference type
         // ISSUE: explicit reference operation
         (^ (CinemachineBlendDefinition&)ref player.CameraControl.CinemachineBrain.m_DefaultBlend).m_Style = (__Null)0;
         Manager.ADV.ChangeADVCamera((Actor)merchant);
         // ISSUE: cast to a reference type
         // ISSUE: explicit reference operation
         ObservableExtensions.Subscribe <long>(Observable.Take <long>(Observable.Skip <long>((IObservable <M0>)Observable.EveryLateUpdate(), 1), 1), (System.Action <M0>)(_ => (^ (CinemachineBlendDefinition&)ref player.CameraControl.CinemachineBrain.m_DefaultBlend).m_Style = (__Null)prevStyle));
         Transform transform4 = ((Component)player.CameraControl.CameraComponent).get_transform();
         merchant.SetLookPtn(1, 3);
         merchant.SetLookTarget(1, 0, transform4);
         ObservableExtensions.Subscribe <long>(Observable.Take <long>(Observable.SkipWhile <long>(Observable.Skip <long>(Observable.TakeUntilDestroy <long>((IObservable <M0>)Observable.EveryUpdate(), (Component)player), 1), (Func <M0, bool>)(_ => player.CameraControl.CinemachineBrain.get_IsBlending())), 1), (System.Action <M0>)(_ => Singleton <MapUIContainer> .Instance.OpenADV(this.openData, (IPack)this.packData)));
     }));
 }