private void Complete()
        {
            MapUIContainer.SetVisibleHUD(true);
            PlayerActor player = Singleton <Manager.Map> .Instance.Player;

            switch (player.Mode)
            {
            case Desire.ActionType.Normal:
            case Desire.ActionType.Date:
                player.CameraControl.Mode = CameraMode.Normal;
                player.Controller.ChangeState("Normal");
                player.CameraControl.OnCameraBlended = (System.Action)(() => Singleton <Manager.Map> .Instance.Player.ChaControl.visibleAll = player.CameraControl.ShotType != ShotType.PointOfView);
                break;
            }
            this.Agent.Animation.ResetDefaultAnimatorController();
            if (Object.op_Equality((Object)this._prevPartner, (Object)player))
            {
                this.Agent.CommandPartner = (Actor)null;
            }
            else
            {
                this.Agent.CommandPartner = this._prevPartner;
            }
            MapUIContainer.SetVisibleHUD(true);
        }
        public virtual void OnStart()
        {
            Debug.Log((object)string.Format("開始するEvent = {0}", (object)this._eventID));
            ((Task)this).OnStart();
            Singleton <MapUIContainer> .Instance.MinimapUI.ChangeCamera(false, false);

            MapUIContainer.SetVisibleHUD(false);
            PlayerActor player = Singleton <Manager.Map> .Instance.Player;
            AgentActor  agent  = this.Agent;

            this._prevPartner        = agent.CommandPartner;
            agent.CommandPartner     = agent.TargetInSightActor;
            agent.TargetInSightActor = (Actor)null;
            agent.ChaControl.ChangeLookEyesTarget(1, ((Component)player.CameraControl.CameraComponent).get_transform(), 0.5f, 0.0f, 1f, 2f);
            agent.ChaControl.ChangeLookEyesPtn(1);
            agent.ChaControl.ChangeLookNeckPtn(3, 1f);
            agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
            Singleton <Manager.Map> .Instance.Player.CameraControl.OnCameraBlended = (System.Action)(() => ObservableExtensions.Subscribe <long>(Observable.Take <long>(Observable.SkipWhile <long>(Observable.SkipWhile <long>((IObservable <M0>)Observable.EveryUpdate(), (Func <M0, bool>)(_ => agent.Animation.PlayingTurnAnimation)), (Func <M0, bool>)(_ => !Singleton <Manager.ADV> .IsInstance() || Singleton <Manager.ADV> .Instance.Captions.IsProcEndADV)), 1), (System.Action <M0>)(_ => this.OpenADV(player, agent))));
            player.CommCompanion = (Actor)agent;
            player.Controller.ChangeState("Communication");
            agent.StopNavMeshAgent();
            agent.ChangeStaticNavMeshAgentAvoidance();
            PoseKeyPair     poseKeyPair     = Singleton <Resources> .Instance.AgentProfile.ADVIdleTable[agent.ChaControl.fileParam.personality];
            PlayState       playState       = Singleton <Resources> .Instance.Animation.AgentActionAnimTable[poseKeyPair.postureID][poseKeyPair.poseID];
            AssetBundleInfo assetBundleInfo = playState.MainStateInfo.AssetBundleInfo;

            agent.ChangeAnimator((string)assetBundleInfo.assetbundle, (string)assetBundleInfo.asset);
            agent.Animation.PlayTurnAnimation(player.Position, 1f, playState.MainStateInfo.InStateInfo, false);
            agent.DisableBehavior();
            Manager.ADV.ChangeADVCamera((Actor)agent);
            MapUIContainer.SetVisibleHUD(false);
            Singleton <Manager.ADV> .Instance.TargetCharacter = agent;
        }
Beispiel #3
0
        private void SetActiveControl(bool isActive)
        {
            Input       instance = Singleton <Input> .Instance;
            IEnumerator coroutine;

            if (isActive)
            {
                MapUIContainer.SetVisibleHUD(false);
                instance.FocusLevel   = 0;
                instance.MenuElements = this.MenuUIList;
                coroutine             = this.DoOpen();
            }
            else
            {
                MapUIContainer.SetVisibleHUD(true);
                instance.ClearMenuElements();
                instance.FocusLevel = -1;
                coroutine           = this.DoClose();
            }
            if (this._fadeDisposable != null)
            {
                this._fadeDisposable.Dispose();
            }
            this._fadeDisposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)Observable.FromCoroutine((Func <IEnumerator>)(() => coroutine), false), (Action <M0>)(_ => {}), (Action <Exception>)(ex => Debug.LogException(ex)));
        }
Beispiel #4
0
 private void Elapsed(PlayerActor player)
 {
     player.CurrentDevicePoint = (DevicePoint)null;
     MapUIContainer.SetVisibleHUD(true);
     MapUIContainer.StorySupportUI.Open();
     player.PlayerController.CommandArea.UpdateCollision(player);
     player.Controller.ChangeState("Normal");
 }
Beispiel #5
0
        private void Refresh(PlayerActor player)
        {
            int       id        = player.CurrentDevicePoint.ID;
            AgentData agentData = Singleton <Game> .Instance.WorldData.AgentTable[id];

            MapUIContainer.SetVisibleHUD(false);
            AgentActor agentActor = Singleton <Manager.Map> .Instance.AddAgent(id, agentData);

            agentActor.DisableBehavior();
            Actor.BehaviorSchedule schedule = agentActor.Schedule;
            schedule.enabled              = false;
            agentActor.Schedule           = schedule;
            agentActor.TargetInSightActor = (Actor)null;
            agentActor.DeactivateNavMeshAgent();
            if (Object.op_Inequality((Object)agentActor.CurrentPoint, (Object)null))
            {
                agentActor.CurrentPoint.SetActiveMapItemObjs(true);
                agentActor.CurrentPoint.ReleaseSlot((Actor)agentActor);
                agentActor.CurrentPoint = (ActionPoint)null;
            }
            agentActor.TargetInSightActionPoint = (ActionPoint)null;
            player.ChaControl.visibleAll        = false;
            Transform pivotPoint = player.CurrentDevicePoint.PivotPoint;

            agentActor.Position = pivotPoint.get_position();
            agentActor.Rotation = pivotPoint.get_rotation();
            agentData.Position  = player.CurrentDevicePoint.RecoverPoints[0].get_position();
            agentData.Rotation  = player.CurrentDevicePoint.RecoverPoints[0].get_rotation();
            Animator animator = this._locator = player.CameraControl.EventCameraLocator;

            ((Component)animator).get_transform().set_position(pivotPoint.get_position());
            ((Component)animator).get_transform().set_rotation(pivotPoint.get_rotation());
            CommonDefine commonDefine = Singleton <Resources> .Instance.CommonDefine;
            RuntimeAnimatorController itemAnimator = Singleton <Resources> .Instance.Animation.GetItemAnimator(commonDefine.ItemAnims.AppearCameraAnimatorID);

            animator.set_runtimeAnimatorController(itemAnimator);
            ((Component)animator).get_transform().set_position(pivotPoint.get_position());
            ((Component)animator).get_transform().set_rotation(pivotPoint.get_rotation());
            animator.set_speed(0.0f);
            animator.Play(commonDefine.AppearCameraInStates[agentActor.ChaControl.fileParam.personality][0]);
            this._eventCamera = ((Component)player.CameraControl.EventCamera).get_transform();
            ((Component)this._eventCamera).get_transform().SetParent(player.CameraControl.EventCameraParent, false);
            ((Component)this._eventCamera).get_transform().set_localPosition(Vector3.get_zero());
            ((Component)this._eventCamera).get_transform().set_localRotation(Quaternion.Euler(0.0f, 180f, 0.0f));
            player.SetActiveOnEquipedItem(false);
            player.CameraControl.Mode = CameraMode.Event;
            Transform playerRecoverPoint = player.CurrentDevicePoint.PlayerRecoverPoint;

            if (Object.op_Inequality((Object)playerRecoverPoint, (Object)null))
            {
                player.NavMeshAgent.Warp(playerRecoverPoint.get_position());
                player.Rotation = playerRecoverPoint.get_rotation();
            }
            this._agent = agentActor;
            Resources.UnloadUnusedAssets();
            GC.Collect();
        }
Beispiel #6
0
 protected override void OnRelease(PlayerActor player)
 {
     switch (player.PlayerController.State)
     {
     case Normal _:
     case Onbu _:
     case Houchi _:
         EventPoint.ChangeNormalState();
         MapUIContainer.SetVisibleHUD(true);
         break;
     }
 }
Beispiel #7
0
 protected override void OnRelease(PlayerActor player)
 {
     this.ReleaseFishingRod();
     this.ChangeNormalAnimation();
     player.CameraControl.Mode = CameraMode.Normal;
     player.CameraControl.SetShotTypeForce(this._prevShotType);
     MapUIContainer.SetActiveFishingUI(false);
     if (MapUIContainer.CommandLabel.Acception != CommandLabel.AcceptionState.InvokeAcception)
     {
         MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
     }
     MapUIContainer.SetVisibleHUD(true);
 }
Beispiel #8
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();
            }));
        }
        private void InitializeCommandLabels()
        {
            if (this._labels != null)
            {
                return;
            }
            Resources instance = Singleton <Resources> .Instance;

            CommonDefine.CommonIconGroup icon = instance.CommonDefine.Icon;
            int    jukeBoxIconId = instance.CommonDefine.Icon.JukeBoxIconID;
            Sprite sprite;

            instance.itemIconTables.ActionIconTable.TryGetValue(jukeBoxIconId, out sprite);
            int index = !Singleton <GameSystem> .IsInstance() ? 0 : Singleton <GameSystem> .Instance.languageInt;

            List <string> source;

            instance.Map.EventPointCommandLabelTextTable.TryGetValue(17, out source);
            this._labels = new CommandLabel.CommandInfo[1]
            {
                new CommandLabel.CommandInfo()
                {
                    Text             = source.GetElement <string>(index),
                    Icon             = sprite,
                    IsHold           = true,
                    TargetSpriteInfo = icon.ActionSpriteInfo,
                    Transform        = this.LabelPoint,
                    Condition        = (Func <PlayerActor, bool>)null,
                    Event            = (Action)(() =>
                    {
                        PlayerActor player = !Singleton <Manager.Map> .IsInstance() ? (PlayerActor)null : Singleton <Manager.Map> .Instance.Player;
                        if (!Object.op_Inequality((Object)player, (Object)null))
                        {
                            return;
                        }
                        player.CurrentjukePoint = this;
                        MapUIContainer.SetVisibleHUD(false);
                        player.PlayerController.ChangeState("Idle");
                        MapUIContainer.JukeBoxUI.ClosedAction = (Action)(() =>
                        {
                            MapUIContainer.SetVisibleHUD(true);
                            player.PlayerController.ChangeState("Normal");
                        });
                        MapUIContainer.SetActiveJukeBoxUI(true);
                    })
                }
            };
        }
 protected override void OnRelease(PlayerActor player)
 {
     if (Object.op_Equality((Object)this._currentFarmPoint, (Object)null))
     {
         return;
     }
     player.CurrentFarmPoint = (FarmPoint)null;
     MapUIContainer.ChickenCoopUI.ClosedEvent = (Action)null;
     MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
     MapUIContainer.SetVisibleHUD(true);
     if (this._input == null)
     {
         return;
     }
     this._input.SetupState();
 }
Beispiel #11
0
 protected override void OnAwake(PlayerActor player)
 {
     this._actorCamera  = player.CameraControl;
     this._camera       = this._actorCamera.CameraComponent;
     this._prevShotType = this._actorCamera.ShotType;
     if (this._prevShotType != ShotType.PointOfView)
     {
         this._actorCamera.ShotType = ShotType.PointOfView;
     }
     this._prevCameraChangeable = this._actorCamera.IsChangeable;
     if (this._prevCameraChangeable)
     {
         this._actorCamera.IsChangeable = false;
     }
     this._prevFieldOfView = (float)this._actorCamera.LensSetting.FieldOfView;
     this._prevDutch       = (float)this._actorCamera.LensSetting.Dutch;
     this._followRoot      = ((CinemachineVirtualCameraBase)this._actorCamera.ActiveFreeLookCamera)?.get_Follow();
     if (Object.op_Inequality((Object)this._followRoot, (Object)null))
     {
         this._prevCameraLocalPosition = this._followRoot.get_localPosition();
         this._prevCameraLocalRotation = this._followRoot.get_localRotation();
     }
     this._cameraLayer = Singleton <Resources> .Instance.DefinePack.MapDefines.MapLayer;
     MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
     MapUIContainer.SetVisibleHUD(false);
     if (Singleton <Resources> .IsInstance())
     {
         LocomotionProfile.LensSettings     defaultLensSetting = Singleton <Resources> .Instance.LocomotionProfile.DefaultLensSetting;
         LocomotionProfile.PhotoShotSetting photoShot          = Singleton <Resources> .Instance.LocomotionProfile.PhotoShot;
         MapUIContainer.PhotoShotUI.SetZoomValue(Mathf.InverseLerp(defaultLensSetting.MinFOV, defaultLensSetting.MaxFOV, this._prevFieldOfView));
     }
     else
     {
         MapUIContainer.PhotoShotUI.SetZoomValue(0.5f);
     }
     MapUIContainer.SetActivePhotoShotUI(true);
     ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndAction, 1), (Action <M0>)(_ =>
     {
         this._updatable = false;
         player.PlayerController.ChangeState("Normal");
     }));
     this._updatable = true;
 }
        protected override void OnAwake(PlayerActor player)
        {
            this._currentFarmPoint = player.CurrentFarmPoint;
            if (Object.op_Equality((Object)this._currentFarmPoint, (Object)null))
            {
                player.PlayerController.ChangeState("Normal");
            }
            else
            {
                this._input = Singleton <Input> .Instance;
                Input.ValidType state = this._input.State;
                this._input.ReserveState(Input.ValidType.UI);
                this._input.SetupState();
                this._input.ReserveState(state);
                MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
                MapUIContainer.SetVisibleHUD(false);
                int registerId = this._currentFarmPoint.RegisterID;
                List <AIProject.SaveData.Environment.ChickenInfo> chickenInfoList1 = (List <AIProject.SaveData.Environment.ChickenInfo>)null;
                Dictionary <int, List <AIProject.SaveData.Environment.ChickenInfo> > dictionary = !Singleton <Game> .IsInstance() ? (Dictionary <int, List <AIProject.SaveData.Environment.ChickenInfo> >)null : Singleton <Game> .Instance.Environment?.ChickenTable;

                if (dictionary != null && (!dictionary.TryGetValue(registerId, out chickenInfoList1) || chickenInfoList1 == null))
                {
                    List <AIProject.SaveData.Environment.ChickenInfo> chickenInfoList2 = new List <AIProject.SaveData.Environment.ChickenInfo>();
                    dictionary[registerId] = chickenInfoList2;
                    chickenInfoList1       = chickenInfoList2;
                }
                if (chickenInfoList1 == null)
                {
                    chickenInfoList1 = new List <AIProject.SaveData.Environment.ChickenInfo>();
                }
                MapUIContainer.ChickenCoopUI.currentChickens = chickenInfoList1;
                MapUIContainer.ChickenCoopUI.ClosedEvent     = (Action)(() => MapUIContainer.CommandList.Visibled = true);
                MapUIContainer.RefreshCommands(0, player.ChickenCoopCommandInfos);
                MapUIContainer.CommandList.CancelEvent = (Action)(() =>
                {
                    MapUIContainer.SetActiveCommandList(false);
                    player.PlayerController.ChangeState("Normal");
                });
                MapUIContainer.SetActiveCommandList(true, "鶏小屋");
            }
        }
Beispiel #13
0
 protected override void OnAwake(PlayerActor actor)
 {
     this.player = actor;
     this.player.SetActiveOnEquipedItem(false);
     this.player.ChaControl.setAllLayerWeight(0.0f);
     this.currentPoseID               = AIProject.Player.Fishing.PoseID.Idle;
     this.currentPlayState            = (PlayState)null;
     this.fishingBeforeAnimController = (RuntimeAnimatorController)null;
     if (Object.op_Equality((Object)this.player, (Object)null))
     {
         actor.Controller.ChangeState("Normal");
     }
     else
     {
         this.InitFishingSystem();
         this.LoadFishingRod();
         if (!this.fishingSystem.playerInfo.ActiveFishingRodInfo)
         {
             this.SetActive(AIProject.Player.Fishing.fishingSystemRoot, false);
             this.player.PlayerController.ChangeState("Normal");
         }
         else
         {
             this.MoveAreaPosY = (float)this.player.PlayerController.CommandArea.BobberPosition.y;
             MapUIContainer.SetVisibleHUD(false);
             MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
             this.player.CameraControl.Mode = CameraMode.Fishing;
             this.LoadFishingAnimator();
             this.PlayStandbyMotion(false);
             this.HaveFishingRod();
             MapUIContainer.SetActiveFishingUI(true);
             this.fishingSystem.Initialize(this);
             this.OnFinished    = (Action <PlayerActor>)(x => this.Finished(x));
             this._prevShotType = this.player.CameraControl.ShotType;
             this.player.CameraControl.SetShotTypeForce(ShotType.Near);
             this.initFlag = true;
         }
     }
 }
Beispiel #14
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)));
     }));
 }
Beispiel #15
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;
        }
Beispiel #16
0
        protected override void OnAwake(PlayerActor player)
        {
            this._player   = player;
            this._agent    = Singleton <Manager.Map> .Instance.TutorialAgent;
            this._isFinish = false;
            if (Object.op_Equality((Object)this._player, (Object)null) || Object.op_Equality((Object)this._agent, (Object)null))
            {
                Debug.LogError((object)"OpeningWakeUp: プレイヤー キャラが空っぽなのはおかしい");
            }
            else
            {
                AgentProfile agentProfile = Singleton <Resources> .Instance.AgentProfile;
                CommonDefine commonDefine = Singleton <Resources> .Instance.CommonDefine;
                Resources.AnimationTables    animation = Singleton <Resources> .Instance.Animation;
                CommonDefine.TutorialSetting setting   = commonDefine.Tutorial;
                player.ChaControl.visibleAll = false;
                this._agent.ChangeTutorialBehavior(AIProject.Definitions.Tutorial.ActionType.Idle);
                player.EventKey = (AIProject.EventType) 0;
                this._fadeEnd   = false;
                int        personality = this._agent.ChaControl.fileParam.personality;
                ChaControl chaControl1 = this._agent.ChaControl;
                chaControl1.ChangeLookEyesPtn(0);
                chaControl1.ChangeLookNeckPtn(3, 1f);
                PoseKeyPair pose;
                PlayState   playState;
                this.TryGetWakeUpAnimState(personality, out pose, out playState);
                MapUIContainer.SetVisibleHUD(false);
                MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
                Singleton <Manager.Input> .Instance.ReserveState(Manager.Input.ValidType.UI);

                Singleton <Manager.Input> .Instance.SetupState();

                // ISSUE: cast to a reference type
                // ISSUE: explicit reference operation
                this._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;
                this._eventCamera = player.CameraControl.EventCamera;
                ((Component)this._eventCamera).get_transform().SetParent(player.CameraControl.EventCameraParent, false);
                ((Component)this._eventCamera).get_transform().set_localPosition(Vector3.get_zero());
                ((Component)this._eventCamera).get_transform().set_localRotation(Quaternion.Euler(0.0f, 180f, 0.0f));
                Animator eventCameraLocator            = player.CameraControl.EventCameraLocator;
                RuntimeAnimatorController itemAnimator = animation.GetItemAnimator(commonDefine.ItemAnims.OpeningWakeUpCameraAnimatorID);
                eventCameraLocator.set_runtimeAnimatorController(itemAnimator);
                ((Component)eventCameraLocator).get_transform().set_position(this._agent.Position);
                ((Component)eventCameraLocator).get_transform().set_rotation(this._agent.Rotation);
                eventCameraLocator.set_speed(0.0f);
                float  shapeBodyValue      = this._agent.ChaControl.GetShapeBodyValue(0);
                string heightParameterName = Singleton <Resources> .Instance.DefinePack.AnimatorParameter.HeightParameterName;
                eventCameraLocator.SetFloat(heightParameterName, shapeBodyValue);
                player.CameraControl.Mode = CameraMode.Event;
                this._agent.Animation.LoadEventKeyTable(pose.postureID, pose.poseID);
                this._agent.Animation.InitializeStates(playState);
                this._agent.LoadEventItems(playState);
                this._agent.Animation.StopAllAnimCoroutine();
                this._agent.Animation.PlayInAnimation(playState.MainStateInfo.InStateInfo.EnableFade, playState.MainStateInfo.InStateInfo.FadeSecond, playState.MainStateInfo.FadeOutTime, playState.Layer);
                this.PlayCameraAnimation(eventCameraLocator, personality);
                Transform  transform   = ((Component)player.CameraControl.CameraComponent).get_transform();
                ChaControl chaControl2 = this._agent.ChaControl;
                chaControl2.ChangeLookEyesTarget(1, transform, 0.5f, 0.0f, 1f, 2f);
                chaControl2.ChangeLookEyesPtn(1);
                this._fadeTimerDisposable = ObservableExtensions.Subscribe <long>(Observable.TakeUntilDestroy <long>((IObservable <M0>)Observable.Timer(TimeSpan.FromSeconds((double)setting.OpeningWakeUpStartFadeTime)), (Component)player), (System.Action <M0>)(_ =>
                {
                    if (Singleton <Sound> .IsInstance())
                    {
                        Singleton <Sound> .Instance.StopBGM(setting.OpeningWakeUpFadeTime);
                    }
                    this._fadeTimerDisposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)MapUIContainer.StartFade(FadeCanvas.PanelType.Blackout, (global::FadeType)1, setting.OpeningWakeUpFadeTime, false), (System.Action <M0>)(__ => {}), (System.Action)(() => this._fadeEnd = true));
                }));
                ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndAction, 1), (System.Action <M0>)(_ =>
                {
                    this._isFinish = true;
                    this.Elapsed(player);
                }));
            }
        }
        private void OpenADV(PlayerActor player, AgentActor agent)
        {
            this.packData.Init();
            this.openData.FindLoad(string.Format("{0}", (object)this._eventID), this.charaID, 2);
            this.packData.SetCommandData((ADV.ICommandData)Singleton <Game> .Instance?.WorldData?.Environment);
            this.packData.SetParam((IParams)agent.AgentData, (IParams)Singleton <Game> .Instance?.WorldData?.PlayerData);
            if (this._eventID == 1)
            {
                bool flag = player.IsBirthday(agent);
                this.packData.isBirthday = flag;
                if (flag)
                {
                    agent.AgentData.IsPlayerForBirthdayEvent = true;
                }
            }
            this.packData.onComplete = (System.Action)(() =>
            {
                if (agent.IsEvent)
                {
                    agent.IsEvent = false;
                }
                agent.EnableBehavior();
                switch (this._eventID)
                {
                case 0:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    this.Complete();
                    agent.SetDesire(Desire.GetDesireKey(Desire.Type.Lonely), 0.0f);
                    agent.SetDesire(Desire.GetDesireKey(Desire.Type.Game), 0.0f);
                    agent.ChangeBehavior(Desire.ActionType.Normal);
                    goto case 4;

                case 1:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    this.Complete();
                    agent.SetDesire(Desire.GetDesireKey(Desire.Type.Gift), 0.0f);
                    agent.ChangeBehavior(Desire.ActionType.Normal);
                    goto case 4;

                case 2:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    this.Complete();
                    agent.SetDesire(Desire.GetDesireKey(Desire.Type.Want), 0.0f);
                    agent.ChangeBehavior(Desire.ActionType.Normal);
                    goto case 4;

                case 3:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    if (this.packData.isSuccessH)
                    {
                        if (player.ChaControl.sex == (byte)1 && !player.ChaControl.fileParam.futanari)
                        {
                            if (agent.CanSelectHCommand(Singleton <Resources> .Instance.DefinePack.MapDefines.LesTypeHMeshTag))
                            {
                                Singleton <HSceneManager> .Instance.nInvitePtn = 0;
                                agent.InitiateHScene(HSceneManager.HEvent.Normal);
                                goto case 4;
                            }
                            else
                            {
                                this.ChangeTakeMode(agent, player, false);
                                goto case 4;
                            }
                        }
                        else if (agent.CanSelectHCommand())
                        {
                            Singleton <HSceneManager> .Instance.nInvitePtn = 0;
                            agent.InitiateHScene(HSceneManager.HEvent.Normal);
                            goto case 4;
                        }
                        else
                        {
                            this.ChangeTakeMode(agent, player, false);
                            goto case 4;
                        }
                    }
                    else if (agent.CanMasturbation)
                    {
                        MapUIContainer.SetVisibleHUD(true);
                        switch (player.Mode)
                        {
                        case Desire.ActionType.Normal:
                        case Desire.ActionType.Date:
                            player.CameraControl.Mode = CameraMode.Normal;
                            player.Controller.ChangeState("Normal");
                            player.CameraControl.OnCameraBlended = (System.Action)(() => Singleton <Manager.Map> .Instance.Player.ChaControl.visibleAll = player.CameraControl.ShotType != ShotType.PointOfView);
                            break;
                        }
                        agent.Animation.ResetDefaultAnimatorController();
                        agent.CommandPartner = this._prevPartner;
                        agent.AddMotivation(Desire.GetDesireKey(Desire.Type.H), 50f);
                        agent.ChangeBehavior(Desire.ActionType.SearchMasturbation);
                        goto case 4;
                    }
                    else
                    {
                        this.Complete();
                        agent.SetDesire(Desire.GetDesireKey(Desire.Type.H), 0.0f);
                        agent.SetDesire(Desire.GetDesireKey(Desire.Type.Lonely), 0.0f);
                        agent.ChangeBehavior(Desire.ActionType.Normal);
                        MapUIContainer.SetVisibleHUD(true);
                        goto case 4;
                    }

                case 4:
                    this.packData.Release();
                    Singleton <Manager.ADV> .Instance.Captions.EndADV((System.Action)null);
                    break;

                case 5:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    if (agent.CanSelectHCommand(Singleton <Resources> .Instance.DefinePack.MapDefines.FloorTypeHMeshTag))
                    {
                        agent.InitiateHScene(HSceneManager.HEvent.FromFemale);
                        goto case 4;
                    }
                    else
                    {
                        this.ChangeTakeMode(agent, player, true);
                        goto case 4;
                    }

                case 6:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    if (this.packData.isSuccessH)
                    {
                        this.ChangeAbductMode(agent, player, Desire.ActionType.TakeSleepPoint);
                        goto case 4;
                    }
                    else
                    {
                        this.Complete();
                        agent.SetDesire(Desire.GetDesireKey(Desire.Type.Lonely), 0.0f);
                        agent.ChangeBehavior(Desire.ActionType.Normal);
                        MapUIContainer.SetVisibleHUD(true);
                        goto case 4;
                    }

                case 7:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    agent.FromFemale = true;
                    this.ChangeAbductMode(agent, player, Desire.ActionType.TakeSleepHPoint);
                    goto case 4;

                case 8:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    if (this.packData.isSuccessH)
                    {
                        this.ChangeAbductMode(agent, player, Desire.ActionType.TakeEatPoint);
                        goto case 4;
                    }
                    else
                    {
                        this.Complete();
                        agent.SetDesire(Desire.GetDesireKey(Desire.Type.Lonely), 0.0f);
                        agent.ChangeBehavior(Desire.ActionType.Normal);
                        MapUIContainer.SetVisibleHUD(true);
                        goto case 4;
                    }

                case 9:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    if (this.packData.isSuccessH)
                    {
                        this.ChangeAbductMode(agent, player, Desire.ActionType.TakeBreakPoint);
                        goto case 4;
                    }
                    else
                    {
                        this.Complete();
                        agent.SetDesire(Desire.GetDesireKey(Desire.Type.Lonely), 0.0f);
                        agent.ChangeBehavior(Desire.ActionType.Normal);
                        MapUIContainer.SetVisibleHUD(true);
                        goto case 4;
                    }

                default:
                    agent.EnableBehavior();
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    goto case 4;
                }
            });
            this.packData.restoreCommands = (CommCommandList.CommandInfo[])null;
            Singleton <MapUIContainer> .Instance.OpenADV(this.openData, (IPack)this.packData);
        }