Пример #1
0
        protected override void OnRelease(PlayerActor player)
        {
            IState state = player.PlayerController.State;

            if (state is Normal || state is Onbu)
            {
                this._prevInteractionState = true;
                this._prevValidType        = Input.ValidType.Action;
                this._prevAcceptionState   = CommandLabel.AcceptionState.InvokeAcception;
            }
            if (this._prevInteractionState != player.CurrentInteractionState)
            {
                player.SetScheduledInteractionState(this._prevInteractionState);
                player.ReleaseInteraction();
            }
            if (this._prevValidType != Singleton <Input> .Instance.State)
            {
                Singleton <Input> .Instance.ReserveState(this._prevValidType);

                Singleton <Input> .Instance.SetupState();
            }
            if (this._prevAcceptionState == MapUIContainer.CommandLabel.Acception)
            {
                return;
            }
            MapUIContainer.SetCommandLabelAcception(this._prevAcceptionState);
        }
Пример #2
0
        protected override void OnAwake(PlayerActor player)
        {
            MapUIContainer.SetActivePlayerChangeUI(true);
            Singleton <Input> .Instance.ReserveState(Input.ValidType.UI);

            Singleton <Input> .Instance.SetupState();

            player.SetScheduledInteractionState(false);
            player.ReleaseInteraction();
            MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
            PlayerData playerData = Singleton <Game> .Instance.WorldData.PlayerData;

            this._prevSex         = playerData.Sex;
            this._prevChaFileName = playerData.CharaFileName;
            ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndMenu, 1), (Action <M0>)(_ =>
            {
                if (this.CheckChange(player))
                {
                    this.StartChange(player);
                }
                else
                {
                    player.Controller.ChangeState("DeviceMenu");
                }
            }));
        }
Пример #3
0
 private void ExitState()
 {
     MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
     ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>)Observable.FromCoroutine((Func <IEnumerator>)(() =>
     {
         PlayerActor player = Singleton <Manager.Map> .Instance.Player;
         return(player.Controller.State.End((Actor)player));
     }), false), 1), (System.Action <M0>)(__ =>
     {
         PlayerActor player = Singleton <Manager.Map> .Instance.Player;
         player.CameraControl.CrossFade.FadeStart(-1f);
         player.PlayerController.ChangeState("Normal");
         player.CameraControl.Mode = CameraMode.Normal;
         MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
         AgentActor agentPartner = player.AgentPartner;
         agentPartner.ChangeBehavior(agentPartner.PrevMode);
         agentPartner.Partner = (Actor)null;
         agentPartner.IsSlave = false;
         ((Behaviour)agentPartner.NavMeshAgent).set_enabled(true);
         Vector3 point    = Vector3.op_Addition(player.Position, Vector3.op_Multiply(player.Back, 10f));
         LayerMask hlayer = Singleton <Resources> .Instance.DefinePack.MapDefines.HLayer;
         GameObject[] gameObjectsWithTag = GameObject.FindGameObjectsWithTag(Singleton <Resources> .Instance.DefinePack.MapDefines.OnbuMeshTag);
         List <MeshCollider> toRelease   = ListPool <MeshCollider> .Get();
         foreach (GameObject gameObject in gameObjectsWithTag)
         {
             MeshCollider[] componentsInChildren = (MeshCollider[])gameObject.GetComponentsInChildren <MeshCollider>();
             toRelease.AddRange((IEnumerable <MeshCollider>)componentsInChildren);
         }
         float num1        = float.PositiveInfinity;
         Vector3 vector3_1 = Vector3.get_zero();
         using (List <MeshCollider> .Enumerator enumerator = toRelease.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 Vector3 vector3_2 = enumerator.Current.NearestVertexTo(point);
                 float num2        = Vector3.Distance(player.Position, vector3_2);
                 if ((double)num2 < (double)num1)
                 {
                     num1      = num2;
                     vector3_1 = vector3_2;
                 }
             }
         }
         ListPool <MeshCollider> .Release(toRelease);
         NavMeshHit navMeshHit;
         if (NavMesh.SamplePosition(vector3_1, ref navMeshHit, 100f, -1))
         {
             vector3_1 = ((NavMeshHit) ref navMeshHit).get_position();
         }
         player.Partner.NavMeshAgent.Warp(vector3_1);
         Vector3 vector3_3 = Vector3.op_Addition(vector3_1, Vector3.op_Multiply(player.Partner.Forward, 10f));
         if (NavMesh.SamplePosition(vector3_3, ref navMeshHit, 100f, -1))
         {
             vector3_3 = ((NavMeshHit) ref navMeshHit).get_position();
         }
         player.NavMeshAgent.Warp(vector3_3);
         player.Partner         = (Actor)null;
         agentPartner.IsVisible = true;
     }));
 }
Пример #4
0
        protected override void OnAwake(PlayerActor player)
        {
            player.SetActiveOnEquipedItem(false);
            player.ChaControl.setAllLayerWeight(0.0f);
            Resources instance = Singleton <Resources> .Instance;
            Sprite    actionIcon;

            instance.itemIconTables.ActionIconTable.TryGetValue(instance.PlayerProfile.CommonActionIconID, out actionIcon);
            this.ChangeModeRelatedSleep(player);
            ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>)MapUIContainer.CommandList.OnCompletedStopAsObservable(), 1), (System.Action <M0>)(_ =>
            {
                MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.CancelAcception);
                MapUIContainer.CommandLabel.CancelCommand = new CommandLabel.CommandInfo()
                {
                    Text             = "もどる",
                    Icon             = actionIcon,
                    TargetSpriteInfo = (CommandTargetSpriteInfo)null,
                    Transform        = (Transform)null,
                    Event            = (System.Action)(() =>
                    {
                        MapUIContainer.CommandLabel.CancelCommand = (CommandLabel.CommandInfo)null;
                        player.Controller.ChangeState("Sleep");
                        MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
                    })
                };
            }));
        }
Пример #5
0
        protected override void OnAwake(PlayerActor player)
        {
            player.EventKey = EventType.Eat;
            player.SetActiveOnEquipedItem(false);
            player.ChaControl.setAllLayerWeight(0.0f);
            MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
            Singleton <Input> .Instance.ReserveState(Input.ValidType.UI);

            Singleton <Input> .Instance.SetupState();

            MapUIContainer.RefreshCommands(0, player.ExitEatEventCommandInfo);
            MapUIContainer.SetActiveCommandList(true, "食事");
            MapUIContainer.CommandList.CancelEvent = (Action)null;
            player.OldEnabledHoldingHand           = ((Behaviour)player.HandsHolder).get_enabled();
            if (!player.OldEnabledHoldingHand)
            {
                return;
            }
            ((Behaviour)player.HandsHolder).set_enabled(false);
            if (!player.HandsHolder.EnabledHolding)
            {
                return;
            }
            player.HandsHolder.EnabledHolding = false;
        }
Пример #6
0
 protected override void OnAwake(PlayerActor player)
 {
     player.SetActiveOnEquipedItem(false);
     player.ChaControl.setAllLayerWeight(0.0f);
     this.isEnd         = false;
     this.isWait        = (Func <PlayerActor, bool>)null;
     this.isNextEnabled = false;
     if (this.disposable != null)
     {
         this.disposable.Clear();
     }
     this.disposable = new CompositeDisposable();
     if (Object.op_Equality((Object)(this.hasAnimal = player.Animal), (Object)null))
     {
         this.isEnd = true;
         this.ToErrorEnd(player);
     }
     else
     {
         this.animalName    = this.hasAnimal.Name;
         this.isCameraBlend = true;
         this.getPercent    = 30f;
         if (this.hasAnimal is WildGround)
         {
             this.getPercent = (this.hasAnimal as WildGround).GetPercent;
         }
         this.getAnimalFlag = (double)Random.Range(0.0f, 100f) <= (double)this.getPercent;
         if (this.getAnimalFlag && Singleton <Resources> .IsInstance() && Singleton <Manager.Map> .IsInstance())
         {
             List <StuffItem> itemList = Singleton <Manager.Map> .Instance.Player?.PlayerData?.ItemList;
             if (itemList != null)
             {
                 this.getIteminfo = this.hasAnimal.ItemInfo;
                 if (this.getIteminfo != null)
                 {
                     this.addItem = new StuffItem(this.getIteminfo.CategoryID, this.getIteminfo.ID, 1);
                     itemList.AddItem(this.addItem);
                 }
             }
         }
         if (Singleton <Manager.Map> .IsInstance())
         {
             List <StuffItem> itemList = Singleton <Manager.Map> .Instance.Player?.PlayerData?.ItemList;
             if (itemList != null && this.hasAnimal is WildGround)
             {
                 ItemIDKeyPair getItemId = (this.hasAnimal as WildGround).GetItemID;
                 itemList.RemoveItem(new StuffItem(getItemId.categoryID, getItemId.itemID, 1));
             }
         }
         MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
         if (this.hasAnimal.AnimalType == AnimalTypes.Cat || this.hasAnimal.AnimalType == AnimalTypes.Chicken)
         {
             this.Initialize(player);
         }
         else
         {
             this.ToErrorEnd(player);
         }
     }
 }
Пример #7
0
        protected override void Start()
        {
            if (Object.op_Equality((Object)this._commandBasePoint, (Object)null))
            {
                this._commandBasePoint = ((Component)this).get_transform().FindLoop(Singleton <Resources> .Instance.DefinePack.MapDefines.CommandTargetName)?.get_transform() ?? ((Component)this).get_transform();
            }
            CommonDefine.CommonIconGroup icon       = Singleton <Resources> .Instance.CommonDefine.Icon;
            DefinePack.MapGroup          mapDefines = Singleton <Resources> .Instance.DefinePack.MapDefines;
            Sprite sprite;

            Singleton <Resources> .Instance.itemIconTables.ActionIconTable.TryGetValue(Singleton <Resources> .Instance.CommonDefine.Icon.ShipIconID, out sprite);

            Transform transform = ((Component)this).get_transform().FindLoop(mapDefines.ShipPointLabelTargetName)?.get_transform() ?? ((Component)this).get_transform();

            this._labels = new CommandLabel.CommandInfo[1]
            {
                new CommandLabel.CommandInfo()
                {
                    Text             = "船",
                    Icon             = sprite,
                    IsHold           = true,
                    TargetSpriteInfo = icon.ActionSpriteInfo,
                    Transform        = transform,
                    Condition        = (Func <PlayerActor, bool>)null,
                    Event            = (Action)(() =>
                    {
                        MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
                        Singleton <Manager.Map> .Instance.Player.Controller.ChangeState("ShipMenu");
                    })
                }
            };
        }
Пример #8
0
        public override void Release(Actor actor, EventType type)
        {
            PlayerActor player = actor as PlayerActor;

            this.OnRelease(player);
            switch (this)
            {
            case Normal _:
            case Houchi _:
            case Onbu _:
label_4:
                actor.ActivateNavMeshAgent();
                actor.IsKinematic = false;
                break;

            default:
                player.ReleaseCurrentPoint();
                if (Object.op_Inequality((Object)player.PlayerController.CommandArea, (Object)null))
                {
                    ((Behaviour)player.PlayerController.CommandArea).set_enabled(true);
                }
                MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
                goto label_4;
            }
        }
Пример #9
0
 private void Close()
 {
     Time.set_timeScale(1f);
     this.IsActiveControl = false;
     MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
     this.playSE.Play(SoundPack.SystemSE.Cancel);
 }
Пример #10
0
        protected override void OnAwake(PlayerActor player)
        {
            player.EventKey = EventType.StorageIn;
            if (Object.op_Inequality((Object)player.CurrentPoint, (Object)null))
            {
                this._chestAnimation = (ChestAnimation)((Component)player.CurrentPoint).GetComponent <ChestAnimation>();
                if (Object.op_Inequality((Object)this._chestAnimation, (Object)null))
                {
                    this._chestAnimation.PlayInAnimation();
                }
            }
            ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndInAnimation, 1), (Action <M0>)(_ => MapUIContainer.SetActiveItemBoxUI(true)), (Action)(() => ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndMenu, 1), (Action <M0>)(_ =>
            {
                MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
                player.Controller.ChangeState("Normal");
            }))));
            Singleton <Input> .Instance.ReserveState(Input.ValidType.UI);

            Singleton <Input> .Instance.SetupState();

            ActorAnimInfo animInfo = player.Animation.AnimInfo;

            animInfo.outEnableBlend   = true;
            animInfo.outBlendSec      = 0.0f;
            player.Animation.AnimInfo = animInfo;
        }
Пример #11
0
        protected override void OnAwake(PlayerActor player)
        {
            Singleton <Input> .Instance.ReserveState(Input.ValidType.UI);

            Singleton <Input> .Instance.SetupState();

            DateActionPointInfo outInfo;

            player.CurrentPoint.TryGetPlayerDateActionPointInfo(player.ChaControl.sex, EventType.Lesbian, out outInfo);
            player.HPoseID = outInfo.poseIDA;
            MapUIContainer.RefreshCommands(0, player.SpecialHCommandInfo);
            MapUIContainer.CommandList.CancelEvent = (Action)(() =>
            {
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
                MapUIContainer.SetActiveCommandList(false);
                player.Controller.ChangeState("Normal");
                player.ReleaseCurrentPoint();
                if (Object.op_Inequality((Object)player.PlayerController.CommandArea, (Object)null))
                {
                    ((Behaviour)player.PlayerController.CommandArea).set_enabled(true);
                }
                MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
                player.ActivateNavMeshAgent();
                player.IsKinematic = false;
            });
            MapUIContainer.SetActiveCommandList(true, "特殊エッチ");
        }
Пример #12
0
        protected override void OnAwake(PlayerActor player)
        {
            player.EventKey = (AIProject.EventType) 0;
            MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
            ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndFadeIn, 1), (System.Action <M0>)(_ =>
            {
                this.Refresh(player);
                ObservableExtensions.Subscribe <long>((IObservable <M0>)Observable.Timer(TimeSpan.FromMilliseconds(100.0)), (System.Action <M0>)(__ =>
                {
                    this._completeWait = true;
                    ObservableExtensions.Subscribe <Unit>((IObservable <M0>)MapUIContainer.StartFade(FadeCanvas.PanelType.Blackout, (global::FadeType)1, 1f, false), (System.Action <M0>)(___ => {}), (System.Action)(() => this._onEndFadeOut.OnNext(Unit.get_Default())));
                }));
            }));
            ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndFadeOut, 1), (System.Action <M0>)(_ => this.StartEventSeq(player)));
            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;
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)MapUIContainer.StartFade(FadeCanvas.PanelType.Blackout, (global::FadeType)0, 1f, true), (System.Action <M0>)(_ => {}), (System.Action)(() => this._onEndFadeIn.OnNext(Unit.get_Default())));
        }
Пример #13
0
        protected override void Start()
        {
            if (DevicePointAnimData.AnimatorItemTable.TryGetValue(this._id, ref this._animator))
            {
                this._animator.set_runtimeAnimatorController(Singleton <Resources> .Instance.Animation.GetItemAnimator(Singleton <Resources> .Instance.CommonDefine.ItemAnims.PodAnimatorID));
            }
            if (Object.op_Equality((Object)this._commandBasePoint, (Object)null))
            {
                this._commandBasePoint = ((Component)this).get_transform().FindLoop(Singleton <Resources> .Instance.DefinePack.MapDefines.CommandTargetName)?.get_transform() ?? ((Component)this).get_transform();
            }
            if (Object.op_Equality((Object)this._pivotPoint, (Object)null))
            {
                this._pivotPoint = ((Component)this).get_transform().FindLoop(Singleton <Resources> .Instance.DefinePack.MapDefines.DevicePointPivotTargetName)?.get_transform() ?? ((Component)this).get_transform();
            }
            if (this._recoverPoints.IsNullOrEmpty <Transform>() || this._recoverPoints.Count < 4)
            {
                this._recoverPoints.Clear();
                foreach (string recoveryTargetName in Singleton <Resources> .Instance.DefinePack.MapDefines.DevicePointRecoveryTargetNames)
                {
                    GameObject loop = ((Component)this).get_transform().FindLoop(recoveryTargetName);
                    if (Object.op_Inequality((Object)loop, (Object)null))
                    {
                        this._recoverPoints.Add(loop.get_transform());
                    }
                }
            }
            if (Object.op_Equality((Object)this._playerRecoverPoint, (Object)null))
            {
                this._playerRecoverPoint = ((Component)this).get_transform().FindLoop(Singleton <Resources> .Instance.DefinePack.MapDefines.DevicePointPlayerRecoveryTargetName)?.get_transform();
            }
            base.Start();
            CommonDefine.CommonIconGroup icon       = Singleton <Resources> .Instance.CommonDefine.Icon;
            DefinePack.MapGroup          mapDefines = Singleton <Resources> .Instance.DefinePack.MapDefines;
            Sprite sprite;

            Singleton <Resources> .Instance.itemIconTables.ActionIconTable.TryGetValue(Singleton <Resources> .Instance.CommonDefine.Icon.DeviceIconID, out sprite);

            Transform transform = ((Component)this).get_transform().FindLoop(mapDefines.DevicePointLabelTargetName)?.get_transform() ?? ((Component)this).get_transform();

            this._labels = new CommandLabel.CommandInfo[1]
            {
                new CommandLabel.CommandInfo()
                {
                    Text             = "データ端末",
                    Icon             = sprite,
                    IsHold           = true,
                    TargetSpriteInfo = icon.ActionSpriteInfo,
                    Transform        = transform,
                    Condition        = (Func <PlayerActor, bool>)null,
                    Event            = (Action)(() =>
                    {
                        Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.BootDevice);
                        MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
                        Singleton <Manager.Map> .Instance.Player.CurrentDevicePoint = this;
                        Singleton <Manager.Map> .Instance.Player.StashData();
                        Singleton <Manager.Map> .Instance.Player.Controller.ChangeState("DeviceMenu");
                    })
                }
            };
        }
Пример #14
0
        protected override void OnAwake(PlayerActor player)
        {
            MapUIContainer.SetActiveCharaMigrationUI(true);
            Singleton <Input> .Instance.ReserveState(Input.ValidType.UI);

            Singleton <Input> .Instance.SetupState();

            player.SetScheduledInteractionState(false);
            player.ReleaseInteraction();
            MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
            this._agentCharaFiles.Clear();
            this._agentCharaMapIDs.Clear();
            foreach (KeyValuePair <int, AgentData> keyValuePair in Singleton <Game> .Instance.WorldData.AgentTable)
            {
                this._agentCharaFiles[keyValuePair.Key]  = keyValuePair.Value.CharaFileName;
                this._agentCharaMapIDs[keyValuePair.Key] = keyValuePair.Value.MapID;
            }
            ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndMenu, 1), (Action <M0>)(_ =>
            {
                if (this.CheckChange(player))
                {
                    return;
                }
                player.Controller.ChangeState("DeviceMenu");
            }));
        }
Пример #15
0
        protected override void OnAwake(PlayerActor player)
        {
            this.minimapUI = Singleton <MapUIContainer> .Instance.MinimapUI;
            this.input     = Singleton <Input> .Instance;
            this.dt        = 0.0f;
            this.minimapUI.OpenAllMap(this.minimapUI.VisibleMode);
            Singleton <MapUIContainer> .Instance.MinimapUI.VisibleMode = 1;
            MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
            Singleton <Input> .Instance.ReserveState(Input.ValidType.UI);

            Singleton <Input> .Instance.SetupState();

            this.minimapUI.FromHomeMenu = false;
            Singleton <MapUIContainer> .Instance.MinimapUI.WarpProc = (MiniMapControler.OnWarp)(x =>
            {
                Singleton <MapUIContainer> .Instance.MinimapUI.AllMapClosedAction = (Action)(() => {});
                string prevStateName = player.PlayerController.PrevStateName;
                Singleton <Manager.Map> .Instance.WarpToBasePoint(x, (Action)(() =>
                {
                    if (prevStateName == "Onbu")
                    {
                        player.Controller.ChangeState("Onbu");
                    }
                    else
                    {
                        player.Controller.ChangeState("Normal");
                    }
                    player.Controller.ChangeState("Idle");
                    GC.Collect();
                    if (this.minimapUI.prevVisibleMode != 0 || !Manager.Config.GameData.MiniMap)
                    {
                        return;
                    }
                    this.minimapUI.OpenMiniMap();
                }), (Action)(() =>
                {
                    if (prevStateName == "Onbu")
                    {
                        player.Controller.ChangeState("Onbu");
                    }
                    else
                    {
                        player.Controller.ChangeState("Normal");
                    }
                    Singleton <Input> .Instance.ReserveState(Input.ValidType.Action);
                    Singleton <Input> .Instance.SetupState();
                    Singleton <Manager.Map> .Instance.Player.SetScheduledInteractionState(true);
                    Singleton <Manager.Map> .Instance.Player.ReleaseInteraction();
                }));
                Singleton <MapUIContainer> .Instance.MinimapUI.WarpProc = (MiniMapControler.OnWarp)null;
            });
            ActorAnimInfo animInfo = player.Animation.AnimInfo;

            animInfo.outEnableBlend   = true;
            animInfo.outBlendSec      = 0.0f;
            player.Animation.AnimInfo = animInfo;
        }
Пример #16
0
 public void ChangeState(string target, ActionPoint point, Action onCompleted = null)
 {
     MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
     if (Object.op_Inequality((Object)this.CommandArea, (Object)null))
     {
         this.CommandArea.SequenceSetConsiderations((Action <ICommandable>)(x => this.CleanPoint(x, point)));
     }
     this._actor.CurrentPoint = point;
     this.ChangeState(target);
     (this._state as PlayerStateBase).OnCompleted = onCompleted;
 }
Пример #17
0
        protected override void OnAwake(PlayerActor player)
        {
            MapUIContainer.SetActivePlayerLookEditUI(true);
            Singleton <Input> .Instance.ReserveState(Input.ValidType.UI);

            Singleton <Input> .Instance.SetupState();

            player.SetScheduledInteractionState(false);
            player.ReleaseInteraction();
            MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
            ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndMenu, 1), (Action <M0>)(_ => player.Controller.ChangeState("DeviceMenu")));
        }
Пример #18
0
 protected override void OnAwake(PlayerActor player)
 {
     player.ChaControl.visibleAll = false;
     MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
     player.SetScheduledInteractionState(false);
     player.ReleaseInteraction();
     if (!Object.op_Inequality((Object)player.CommCompanion, (Object)null))
     {
         return;
     }
     player.CommCompanion.Animation.BeginIgnoreExpression();
 }
Пример #19
0
 private void OnStart(PlayerActor player)
 {
     MapUIContainer.RefreshCommands(0, player.SleepCommandInfos);
     MapUIContainer.CommandList.CancelEvent = (System.Action)(() =>
     {
         Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
         ActorAnimInfo animInfo = player.Animation.AnimInfo;
         player.SetStand(player.Animation.RecoveryPoint, animInfo.endEnableBlend, animInfo.endBlendSec, animInfo.directionType);
         player.Animation.RecoveryPoint   = (Transform)null;
         player.Animation.RefsActAnimInfo = true;
         player.Controller.ChangeState("Normal");
         player.ReleaseCurrentPoint();
         if (Object.op_Inequality((Object)player.PlayerController.CommandArea, (Object)null))
         {
             ((Behaviour)player.PlayerController.CommandArea).set_enabled(true);
         }
         MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
         player.ActivateNavMeshAgent();
         player.IsKinematic = false;
         MapUIContainer.SetActiveCommandList(false);
     });
     MapUIContainer.SetActiveCommandList(true, "睡眠");
     this._onEndActionDisposable = ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndAction, 1), (System.Action <M0>)(__ =>
     {
         Dictionary <int, Dictionary <int, Dictionary <int, PlayState> > > playerActionAnimTable = Singleton <Resources> .Instance.Animation.PlayerActionAnimTable;
         PoseKeyPair wakeupPoseId = Singleton <Resources> .Instance.PlayerProfile.PoseIDData.WakeupPoseID;
         PlayState info           = playerActionAnimTable[(int)player.ChaControl.sex][wakeupPoseId.postureID][wakeupPoseId.poseID];
         player.Animation.StopAllAnimCoroutine();
         player.Animation.InitializeStates(info);
         player.ActivateNavMeshAgent();
         player.IsKinematic     = false;
         ActorAnimInfo animInfo = player.Animation.AnimInfo;
         player.SetStand(player.Animation.RecoveryPoint, animInfo.endEnableBlend, animInfo.endBlendSec, 0);
         player.Animation.PlayInAnimation(info.MainStateInfo.InStateInfo.EnableFade, info.MainStateInfo.InStateInfo.FadeSecond, info.MainStateInfo.FadeOutTime, info.Layer);
         player.CameraControl.Mode = CameraMode.Normal;
         player.CameraControl.RecoverShotType();
         player.CameraControl.EnabledInput = true;
     }));
     this._onEndInAnimDisposable = ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndInAnim, 1), (System.Action <M0>)(__ =>
     {
         ActorAnimInfo animInfo = player.Animation.AnimInfo;
         player.SetStand(player.Animation.RecoveryPoint, animInfo.endEnableBlend, animInfo.endBlendSec, animInfo.directionType);
         player.Animation.RefsActAnimInfo = true;
         player.Controller.ChangeState("Normal");
         player.ReleaseCurrentPoint();
         if (Object.op_Inequality((Object)player.PlayerController.CommandArea, (Object)null))
         {
             ((Behaviour)player.PlayerController.CommandArea).set_enabled(true);
         }
         MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
     }));
 }
Пример #20
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);
 }
Пример #21
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();
            }));
        }
        public static void RefreshSheets()
        {
            List <ADMSheet>  sheets     = new List <ADMSheet>();
            PlayerActor      player     = Map.Instance.Player;
            PlayerController controller = player.PlayerController;

            DevicePoint[] devices = Object.FindObjectsOfType <DevicePoint>();

            if (devices != null && devices.Length > 0)
            {
                DevicePoint device = devices.FirstOrDefault(v => v.ID == 0);

                if (device != null)
                {
                    sheets.Add(new ADMSheet("数据终端", () =>
                    {
                        MapUIContainer.SystemMenuUI.IsActiveControl = false;

                        Manager.Resources.Instance.SoundPack.Play(SoundPack.SystemSE.BootDevice);
                        MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);

                        player.CurrentDevicePoint = device;

                        MapUIContainer.RefreshCommands(0, player.DeviceCommandInfos);
                        MapUIContainer.SetActiveCommandList(true, "データ端末");
                        controller.ChangeState("DeviceMenu");
                    }));
                }
            }

            sheets.Add(MakeSheet(controller, /*"Item Box"*/ "物品箱", "ItemBox", MapUIContainer.ItemBoxUI));
            sheets.Add(MakeSheet(controller, /*"Bathing Outfits"*/ "更衣处", "DressRoom", MapUIContainer.DressRoomUI));
            sheets.Add(MakeSheet(controller, /*"Closet Outfits"*/ "服装棚", "ClothChange", MapUIContainer.ClosetUI));
            sheets.Add(MakeSheet(controller, /*"Shan's Shop"*/ "商店", null, MapUIContainer.ShopUI, true));

            sheets.Add(new ADMSheet(/*"Kitchen"*/ "灶台", () =>
            {
                MapUIContainer.SystemMenuUI.IsActiveControl = false;

                MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
                MapUIContainer.RefreshCommands(0, player.CookCommandInfos);
                MapUIContainer.SetActiveCommandList(true, "料理");
                controller.ChangeState("Kitchen");
            }));

            sheets.Add(MakeSheet(controller, /*"Pet Synthesis"*/ "宠物合成", "Craft", MapUIContainer.PetCraftUI, true));
            sheets.Add(MakeSheet(controller, /*"Medicine Table"*/ "制药台", "Craft", MapUIContainer.MedicineCraftUI, true));
            sheets.Add(MakeSheet(controller, /*"Jukebox"*/ "更改BGM", null, MapUIContainer.JukeBoxUI, true));

            sheet.SetSheets(sheets);
        }
Пример #23
0
        protected override void OnAwake(PlayerActor player)
        {
            CraftPoint currentCraftPoint = player.CurrentCraftPoint;

            if (Object.op_Equality((Object)currentCraftPoint, (Object)null) || !Singleton <MapUIContainer> .IsInstance())
            {
                player.PlayerController.ChangeState("Normal");
            }
            else
            {
                MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
                player.SetScheduledInteractionState(false);
                player.ReleaseInteraction();
                CraftUI     craftUi     = (CraftUI)null;
                RecyclingUI recyclingUi = (RecyclingUI)null;
                switch (currentCraftPoint.Kind)
                {
                case CraftPoint.CraftKind.Medicine:
                    craftUi = MapUIContainer.MedicineCraftUI;
                    break;

                case CraftPoint.CraftKind.Pet:
                    craftUi = MapUIContainer.PetCraftUI;
                    break;

                case CraftPoint.CraftKind.Recycling:
                    recyclingUi = MapUIContainer.RecyclingUI;
                    break;

                default:
                    this.OnClosed(player);
                    break;
                }
                if (Object.op_Inequality((Object)craftUi, (Object)null))
                {
                    craftUi.OnClosedEvent   = (Action)(() => this.OnClosed(player));
                    craftUi.IsActiveControl = true;
                }
                else if (Object.op_Inequality((Object)recyclingUi, (Object)null))
                {
                    recyclingUi.OnClosedEvent   = (Action)(() => this.OnClosed(player));
                    recyclingUi.IsActiveControl = true;
                }
                else
                {
                    this.OnClosed(player);
                }
            }
        }
Пример #24
0
 private void OnClosed(PlayerActor player)
 {
     if (Singleton <MapUIContainer> .IsInstance())
     {
         MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
     }
     player.SetScheduledInteractionState(true);
     player.ReleaseInteraction();
     if (Singleton <Input> .IsInstance())
     {
         Input instance = Singleton <Input> .Instance;
         instance.ReserveState(Input.ValidType.Action);
         instance.SetupState();
     }
     player.PlayerController.ChangeState("Normal");
 }
Пример #25
0
 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();
 }
Пример #26
0
        protected override void OnAwake(PlayerActor player)
        {
            MapUIContainer.SetActiveRefrigeratorUI(true);
            Singleton <Input> .Instance.ReserveState(Input.ValidType.UI);

            Singleton <Input> .Instance.SetupState();

            player.SetScheduledInteractionState(false);
            player.ReleaseInteraction();
            MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
            ActorAnimInfo animInfo = player.Animation.AnimInfo;

            animInfo.outEnableBlend   = true;
            animInfo.outBlendSec      = 0.0f;
            player.Animation.AnimInfo = animInfo;
            ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndMenu, 1), (Action <M0>)(_ => player.Controller.ChangeState("Kitchen")));
        }
Пример #27
0
            static void OpenDeviceMenu()
            {
                DevicePoint[] devices = FindObjectsOfType <DevicePoint>();
                DevicePoint   device  = devices?.FirstOrDefault(v => v.ID == 0);

                if (device != null)
                {
                    PlayerActor player = Map.Instance.Player;
                    player.CurrentDevicePoint = device;

                    Resources.Instance.SoundPack.Play(SoundPack.SystemSE.BootDevice);
                    MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
                    MapUIContainer.RefreshCommands(0, player.DeviceCommandInfos);
                    MapUIContainer.SetActiveCommandList(true, "データ端末");
                    player.PlayerController.ChangeState("DeviceMenu");
                }
            }
Пример #28
0
 private void OnEndSet(PlayerActor player)
 {
     if (this.getAnimalFlag)
     {
         if (this.getIteminfo != null && this.addItem != null)
         {
             MapUIContainer.AddSystemItemLog(this.getIteminfo, this.addItem.Count, true);
         }
         else
         {
             MapUIContainer.AddNotify(MapUIContainer.ItemGetEmptyText);
         }
     }
     player.ClearItems();
     player.Animal = (AnimalBase)null;
     MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
     player.PlayerController.ChangeState("Normal");
 }
Пример #29
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;
 }
Пример #30
0
 protected override void OnRelease(PlayerActor player)
 {
     switch (player.PlayerController.State)
     {
     case Normal _:
     case Onbu _:
         this._prevAcceptionState = CommandLabel.AcceptionState.InvokeAcception;
         break;
     }
     player.NavMeshAgent.set_avoidancePriority(this._prevAvoidancePriority);
     if (Object.op_Inequality((Object)player.Partner, (Object)null))
     {
         player.Partner.NavMeshAgent.set_obstacleAvoidanceType((ObstacleAvoidanceType)4);
     }
     if (this._prevAcceptionState == MapUIContainer.CommandLabel.Acception)
     {
         return;
     }
     MapUIContainer.SetCommandLabelAcception(this._prevAcceptionState);
 }