Esempio n. 1
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, "特殊エッチ");
        }
Esempio n. 2
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;
        }
Esempio n. 3
0
        protected override void OnAwake(PlayerActor player)
        {
            Singleton <Input> .Instance.ReserveState(Input.ValidType.UI);

            Singleton <Input> .Instance.SetupState();

            MapUIContainer.SetVisibleHUDExceptStoryUI(false);
            MapUIContainer.StorySupportUI.Close();
            MapUIContainer.RefreshCommands(0, player.WarpCommandInfos);
            MapUIContainer.CommandList.CancelEvent = (Action)(() => player.CancelWarp());
            MapUIContainer.SetActiveCommandList(true, "ワープ");
        }
Esempio n. 4
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);
     }));
 }
        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);
        }
Esempio n. 6
0
 private void OnStart(PlayerActor player)
 {
     Singleton <Manager.Map> .Instance.AccessDeviceID = player.CurrentDevicePoint.ID;
     MapUIContainer.RefreshCommands(0, player.DeviceCommandInfos);
     MapUIContainer.CommandList.CancelEvent = (Action)(() =>
     {
         Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
         Singleton <Manager.Map> .Instance.AccessDeviceID = -1;
         MapUIContainer.SetActiveCommandList(false);
         MapUIContainer.SetVisibleHUDExceptStoryUI(true);
         MapUIContainer.StorySupportUI.Open();
         player.Controller.ChangeState("Normal");
         player.CurrentDevicePoint = (DevicePoint)null;
     });
     MapUIContainer.SetActiveCommandList(true, "データ端末");
 }
Esempio n. 7
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");
                }
            }
Esempio n. 8
0
        protected override void OnAwake(PlayerActor player)
        {
            Singleton <Input> .Instance.ReserveState(Input.ValidType.UI);

            Singleton <Input> .Instance.SetupState();

            MapUIContainer.SetVisibleHUDExceptStoryUI(false);
            MapUIContainer.StorySupportUI.Close();
            MapUIContainer.RefreshCommands(0, player.BaseCommandInfos);
            MapUIContainer.CommandList.CancelEvent = (Action)(() =>
            {
                MapUIContainer.SetActiveCommandList(false);
                MapUIContainer.SetVisibleHUDExceptStoryUI(true);
                MapUIContainer.StorySupportUI.Open();
                player.Controller.ChangeState("Normal");
            });
            MapUIContainer.SetActiveCommandList(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, "鶏小屋");
            }
        }
Esempio n. 10
0
 private void OnStart(PlayerActor player)
 {
     MapUIContainer.RefreshCommands(0, player.CookCommandInfos);
     MapUIContainer.CommandList.CancelEvent = (Action)(() =>
     {
         Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
         MapUIContainer.SetActiveCommandList(false);
         MapUIContainer.SetVisibleHUDExceptStoryUI(true);
         MapUIContainer.StorySupportUI.Open();
         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, "料理");
 }
Esempio n. 11
0
        protected override void OnAwake(PlayerActor player)
        {
            player.EventKey = AIProject.EventType.Eat;
            player.SetActiveOnEquipedItem(false);
            player.ChaControl.setAllLayerWeight(0.0f);
            MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
            Singleton <Manager.Input> .Instance.ReserveState(Manager.Input.ValidType.UI);

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

            ObservableExtensions.Subscribe <long>((IObservable <M0>)Observable.Timer(TimeSpan.FromSeconds(1.0)), (System.Action <M0>)(_ =>
            {
                MapUIContainer.RefreshCommands(0, player.DateEatCommandInfos);
                MapUIContainer.SetActiveCommandList(true, "食事");
                MapUIContainer.CommandList.CancelEvent = (System.Action)null;
            }));
            int type = (int)AIProject.Definitions.Action.NameTable[AIProject.EventType.Eat].Item1;
            DateActionPointInfo outInfo;

            player.CurrentPoint.TryGetPlayerDateActionPointInfo(player.ChaControl.sex, AIProject.EventType.Eat, out outInfo);
            AgentActor partner = player.Partner as AgentActor;
            int        poseIda = outInfo.poseIDA;

            player.PoseID = poseIda;
            int index   = poseIda;
            int poseIdb = outInfo.poseIDB;

            partner.PoseID = poseIdb;
            int        poseIDB = poseIdb;
            Transform  t1      = ((Component)player.CurrentPoint).get_transform().FindLoop(outInfo.baseNullNameA)?.get_transform() ?? ((Component)player.CurrentPoint).get_transform();
            Transform  t2      = ((Component)player.CurrentPoint).get_transform().FindLoop(outInfo.baseNullNameB)?.get_transform() ?? ((Component)player.CurrentPoint).get_transform();
            GameObject loop1   = ((Component)player.CurrentPoint).get_transform().FindLoop(outInfo.recoveryNullNameA);

            player.Animation.RecoveryPoint = loop1?.get_transform();
            GameObject loop2 = ((Component)player.CurrentPoint).get_transform().FindLoop(outInfo.recoveryNullNameB);

            player.Partner.Animation.RecoveryPoint = loop2?.get_transform();
            PlayState playState1 = Singleton <Resources> .Instance.Animation.PlayerActionAnimTable[(int)player.ChaControl.sex][type][index];

            player.Animation.LoadEventKeyTable(type, outInfo.poseIDA);
            player.LoadEventItems(playState1);
            player.LoadEventParticles(type, outInfo.poseIDA);
            player.Animation.InitializeStates(playState1);
            partner.Animation.LoadEventKeyTable(type, outInfo.poseIDB);
            PlayState playState2 = Singleton <Resources> .Instance.Animation.AgentActionAnimTable[type][outInfo.poseIDB];

            partner.LoadEventItems(playState2);
            partner.LoadEventParticles(type, outInfo.poseIDB);
            partner.Animation.InitializeStates(playState2);
            ActorAnimInfo actorAnimInfo1 = new ActorAnimInfo()
            {
                layer          = playState1.Layer,
                inEnableBlend  = playState1.MainStateInfo.InStateInfo.EnableFade,
                inBlendSec     = playState1.MainStateInfo.InStateInfo.FadeSecond,
                outEnableBlend = playState1.MainStateInfo.OutStateInfo.EnableFade,
                outBlendSec    = playState1.MainStateInfo.OutStateInfo.FadeSecond,
                directionType  = playState1.DirectionType,
                isLoop         = playState1.MainStateInfo.IsLoop,
                endEnableBlend = playState1.EndEnableBlend,
                endBlendSec    = playState1.EndBlendRate
            };

            player.Animation.AnimInfo = actorAnimInfo1;
            ActorAnimInfo actorAnimInfo2 = actorAnimInfo1;
            ActorAnimInfo actorAnimInfo3 = new ActorAnimInfo()
            {
                layer          = playState2.Layer,
                inEnableBlend  = playState2.MainStateInfo.InStateInfo.EnableFade,
                inBlendSec     = playState2.MainStateInfo.InStateInfo.FadeSecond,
                outEnableBlend = playState2.MainStateInfo.OutStateInfo.EnableFade,
                outBlendSec    = playState2.MainStateInfo.OutStateInfo.FadeSecond,
                directionType  = playState1.DirectionType,
                isLoop         = playState1.MainStateInfo.IsLoop,
                endEnableBlend = playState1.EndEnableBlend,
                endBlendSec    = playState1.EndBlendRate,
                loopMinTime    = playState2.MainStateInfo.LoopMin,
                loopMaxTime    = playState2.MainStateInfo.LoopMax,
                hasAction      = playState2.ActionInfo.hasAction
            };

            partner.Animation.AnimInfo = actorAnimInfo3;
            ActorAnimInfo actorAnimInfo4 = actorAnimInfo3;
            List <int>    intList        = ListPool <int> .Get();

            foreach (KeyValuePair <int, Dictionary <int, int> > foodDateEventItem in Singleton <Resources> .Instance.Map.FoodDateEventItemList)
            {
                foreach (KeyValuePair <int, int> keyValuePair in foodDateEventItem.Value)
                {
                    if (keyValuePair.Value != -1)
                    {
                        intList.Add(keyValuePair.Value);
                    }
                }
            }
            int num = -1;

            if (!intList.IsNullOrEmpty <int>())
            {
                num = intList.GetElement <int>(Random.Range(0, intList.Count));
            }
            ListPool <int> .Release(intList);

            ActionItemInfo eventItemInfo;

            if (Singleton <Resources> .Instance.Map.EventItemList.TryGetValue(num, out eventItemInfo))
            {
                string     rootParentName = Singleton <Resources> .Instance.LocomotionProfile.RootParentName;
                GameObject gameObject1    = player.LoadEventItem(num, rootParentName, false, eventItemInfo);
                if (Object.op_Inequality((Object)gameObject1, (Object)null))
                {
                    foreach (Renderer componentsInChild in (Renderer[])gameObject1.GetComponentsInChildren <Renderer>(true))
                    {
                        componentsInChild.set_enabled(true);
                    }
                }
                GameObject gameObject2 = partner.LoadEventItem(num, rootParentName, false, eventItemInfo);
                if (Object.op_Inequality((Object)gameObject2, (Object)null))
                {
                    foreach (Renderer componentsInChild in (Renderer[])gameObject2.GetComponentsInChildren <Renderer>(true))
                    {
                        componentsInChild.set_enabled(true);
                    }
                }
            }
            player.DeactivateNavMeshAgent();
            player.IsKinematic = true;
            partner.SetActiveOnEquipedItem(false);
            partner.ChaControl.setAllLayerWeight(0.0f);
            partner.DeactivateNavMeshAgent();
            partner.IsKinematic = true;
            this._hasAction     = playState1.ActionInfo.hasAction;
            if (this._hasAction)
            {
                this._loopStateName     = playState1.MainStateInfo.InStateInfo.StateInfos.GetElement <PlayState.Info>(playState1.MainStateInfo.InStateInfo.StateInfos.Length - 1).stateName;
                this._randomCount       = playState1.ActionInfo.randomCount;
                this._oldNormalizedTime = 0.0f;
            }
            player.Animation.PlayInAnimation(actorAnimInfo2.inEnableBlend, actorAnimInfo2.inBlendSec, playState1.MainStateInfo.FadeOutTime, actorAnimInfo2.layer);
            player.SetStand(t1, playState1.MainStateInfo.InStateInfo.EnableFade, playState1.MainStateInfo.InStateInfo.FadeSecond, playState1.DirectionType);
            partner.Animation.PlayInAnimation(actorAnimInfo4.inEnableBlend, actorAnimInfo4.inBlendSec, playState2.MainStateInfo.FadeOutTime, actorAnimInfo4.layer);
            partner.SetStand(t2, playState2.MainStateInfo.InStateInfo.EnableFade, playState2.MainStateInfo.InStateInfo.FadeSecond, actorAnimInfo4.layer);
            ObservableExtensions.Subscribe <long>(Observable.Take <long>(Observable.Skip <long>((IObservable <M0>)Observable.EveryLateUpdate(), 1), 1), (System.Action <M0>)(_ => this.ChangeCamera(type, poseIDB, (Actor)partner)));
            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;
        }