Пример #1
0
        public static bool Prefix_HScene_InitCoroutine()
        {
            HSceneManager manager = HSceneManager.Instance;

            if (RealTime.Value)
            {
                foreach (AgentActor actor in Map.Instance.AgentTable.Values)
                {
                    if (actor != null && actor != manager.females[0] && actor != manager.females[1])
                    {
                        actor.EnableEntity();
                    }
                }

                if (!manager.bMerchant)
                {
                    MerchantActor merchant = Map.Instance.Merchant;
                    merchant.Controller.enabled        = true;
                    merchant.AnimationMerchant.enabled = true;

                    merchant.EnableEntity();
                }
            }

            return(true);
        }
Пример #2
0
 public void Init()
 {
     this.hScene        = (HScene)((Component)Singleton <HSceneFlagCtrl> .Instance).GetComponent <HScene>();
     this.hSceneManager = Singleton <HSceneManager> .Instance;
     this.females       = this.hScene.GetFemales();
     this.SetClothCharacter(true);
     // ISSUE: method pointer
     this.hSceneSpriteChaChoice.SetAction(new UnityAction((object)this, __methodptr(\u003CInit\u003Em__0)));
 }
Пример #3
0
        public static void HScene_SetStartAnimationInfo_HeightPostfix(HScene __instance, HSceneManager ___hSceneManager)
        {
            manager = ___hSceneManager;
            males   = __instance.GetMales();

            HS2_UnlockPlayerHeight.chara    = males[0];
            HS2_UnlockPlayerHeight.chara2nd = males[1];

            HS2_UnlockPlayerHeight.cardHeightValue    = 0.75f;
            HS2_UnlockPlayerHeight.cardHeightValue2nd = 0.75f;

            var png1 = manager.pngMale;

            if (HS2_UnlockPlayerHeight.chara != null && png1 != null)
            {
                if (png1 == "")
                {
                    png1 = HS2_UnlockPlayerHeight.chara.chaFile.charaFileName;

                    if (png1 == "")
                    {
                        png1 = "HS2_ill_M_000";
                    }
                }

                var card = new ChaFileControl();
                if (manager.bFutanari && card.LoadCharaFile(png1, 1, true) || card.LoadCharaFile(png1, 255, true))
                {
                    HS2_UnlockPlayerHeight.cardHeightValue = card.custom.body.shapeValueBody[0];
                    HS2_UnlockPlayerHeight.ApplySettings(false);
                }
            }

            var png2 = manager.pngMaleSecond;

            if (HS2_UnlockPlayerHeight.chara2nd != null && png2 != null)
            {
                if (png2 == "")
                {
                    png2 = HS2_UnlockPlayerHeight.chara2nd.chaFile.charaFileName;

                    if (png2 == "")
                    {
                        png2 = "HS2_ill_M_000";
                    }
                }

                var card = new ChaFileControl();
                if (manager.bFutanariSecond && card.LoadCharaFile(png2, 1, true) || card.LoadCharaFile(png2, 255, true))
                {
                    HS2_UnlockPlayerHeight.cardHeightValue2nd = card.custom.body.shapeValueBody[0];
                    HS2_UnlockPlayerHeight.ApplySettings(true);
                }
            }
        }
Пример #4
0
 public ProcBase(DeliveryMember _delivery)
 {
     this.ctrlFlag        = _delivery.ctrlFlag;
     this.chaMales        = _delivery.chaMales;
     this.chaFemales      = _delivery.chaFemales;
     this.fade            = _delivery.fade;
     this.ctrlMeta        = _delivery.ctrlMeta;
     this.sprite          = _delivery.sprite;
     this.item            = _delivery.item;
     this.feelHit         = _delivery.feelHit;
     this.auto            = _delivery.auto;
     this.voice           = _delivery.voice;
     this.particle        = _delivery.particle;
     this.se              = _delivery.se;
     this.lstMotionIK     = _delivery.lstMotionIK;
     this.AtariEffect     = _delivery.AtariEffect;
     this.FeelHitEffect3D = _delivery.FeelHitEffect3D;
     this.Hitem           = (HSceneSpriteHitem)this.sprite.objHItem.GetComponent <HSceneSpriteHitem>();
     if (Object.op_Equality((Object)ProcBase.hSceneManager, (Object)null))
     {
         ProcBase.hSceneManager = Singleton <HSceneManager> .Instance;
     }
     for (int index = 0; index < 2; ++index)
     {
         this.randVoicePlays[index] = new ShuffleRand(-1);
         this.randVoicePlays[index].Init(index != 0 ? 2 : 3);
     }
     ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>) this.isAtariHit, (Func <M0, bool>)(x => this.isAtariHitOld != x && this.CatID != 1)), (Action <M0>)(x =>
     {
         if (this.CatID == 7 && Singleton <HSceneFlagCtrl> .Instance.nowAnimationInfo.ActionCtrl.Item2 == 1 || Singleton <HSceneFlagCtrl> .Instance.nowAnimationInfo.ActionCtrl.Item2 == 2)
         {
             return;
         }
         this.isAtariHitOld = x;
         if (x)
         {
             this.AtariEffect.Play();
             if (!Singleton <HSceneManager> .Instance.isParticle)
             {
                 return;
             }
             this.FeelHitEffect3D.Play();
         }
         else
         {
             this.AtariEffect.Stop();
             this.FeelHitEffect3D.Stop();
         }
     }));
 }
Пример #5
0
        private void Start()
        {
            instance = Singleton <HSceneManager> .Instance;
            camera   = FindObjectOfType <CameraControl_Ver2>();
            defaultCameraMoveSpeed = camera.moveSpeed;

            lockOnHotkey              = new Hotkey(ModPrefs.GetString("LockOnPlugin", "LockOnHotkey", "M", true).ToLower()[0].ToString(), 0.5f);
            rotationHotkey            = new Hotkey(ModPrefs.GetString("LockOnPlugin", "RotationHotkey", "N", true).ToLower()[0].ToString(), 0.5f);
            lockedZoomSpeed           = ModPrefs.GetFloat("LockOnPlugin", "LockedZoomSpeed", 5.0f, true);
            lockedMinDistance         = Math.Abs(ModPrefs.GetFloat("LockOnPlugin", "LockedMinDistance", 0.2f, true));
            lockedTrackingSpeed1      = lockedTrackingSpeed2 = Math.Abs(ModPrefs.GetFloat("LockOnPlugin", "LockedTrackingSpeed", 0.1f, true));
            boneList                  = ModPrefs.GetString("LockOnPlugin", "BoneList", "J_Head|J_Mune00|J_Spine01|J_Kokan", true).Split('|');
            camera.isOutsideTargetTex = !Convert.ToBoolean(ModPrefs.GetString("LockOnPlugin", "HideCameraTarget", "True", true));
            manageCursorVisibility    = Convert.ToBoolean(ModPrefs.GetString("LockOnPlugin", "ManageCursorVisibility", "True", true));
        }
Пример #6
0
        static void HSceneEnd(HSceneManager __instance)
        {
#if DEBUG
            AdditionalAccessoryControlsPlugin.Instance.Log.LogInfo("End HScene");
#endif
            foreach (ChaControl actor in hActors)
            {
                if (actor != null)
                {
#if DEBUG
                    AdditionalAccessoryControlsPlugin.Instance.Log.LogInfo($"Sending event for: {actor?.fileParam?.fullname}");
#endif
                    actor.gameObject.GetComponent <AdditionalAccessoryControlsController>().HandleVisibilityRules(hend: true);
                }
            }
        }
        public void ChangeState()
        {
            if (Object.op_Equality((Object)this.chara, (Object)null))
            {
                return;
            }
            HSceneManager instance = Singleton <HSceneManager> .Instance;

            if (this.id != 3)
            {
                if (this.active)
                {
                    this.chara.ShowExtraAccessory((ChaControlDefine.ExtraAccessoryParts) this.id, false);
                }
                else
                {
                    this.chara.ShowExtraAccessory((ChaControlDefine.ExtraAccessoryParts) this.id, true);
                }
            }
            else if (this.active)
            {
                this.chara.ShowExtraAccessory((ChaControlDefine.ExtraAccessoryParts) this.id, false);
                if (Object.op_Inequality((Object)instance.Player, (Object)null) && Object.op_Equality((Object)instance.Player.ChaControl, (Object)this.chara) && (instance.Player.EquipedItem != null && Object.op_Inequality((Object)instance.Player.EquipedItem.AsGameObject, (Object)null)))
                {
                    instance.Player.EquipedItem.AsGameObject.SetActive(false);
                }
            }
            else
            {
                this.chara.ShowExtraAccessory((ChaControlDefine.ExtraAccessoryParts) this.id, true);
                if (Object.op_Inequality((Object)instance.Player, (Object)null) && Object.op_Equality((Object)instance.Player.ChaControl, (Object)this.chara) && (instance.Player.EquipedItem != null && Object.op_Inequality((Object)instance.Player.EquipedItem.AsGameObject, (Object)null)))
                {
                    instance.Player.EquipedItem.AsGameObject.SetActive(true);
                }
            }
            ((Component)this.On).get_gameObject().SetActive(!this.active);
            ((Component)this.Off).get_gameObject().SetActive(this.active);
            HSceneSpriteAccessoryCondition.EquipBt equipBt = this;
            equipBt.active = ((equipBt.active ? 1 : 0) ^ 1) != 0;
        }
 public void Init()
 {
     this.hScene        = (HScene)((Component)Singleton <HSceneFlagCtrl> .Instance).GetComponent <HScene>();
     this.hSceneManager = Singleton <HSceneManager> .Instance;
     this.females       = this.hScene.GetFemales();
     this.Males         = this.hScene.GetMales();
     for (int index1 = 0; index1 < 4; ++index1)
     {
         ChaControl chaControl = index1 >= 2 ? this.Males[index1 - 2] : this.females[index1];
         if (!Object.op_Equality((Object)chaControl, (Object)null))
         {
             for (int index2 = 0; index2 < 4; ++index2)
             {
                 this.before[index1, index2] = !Object.op_Equality((Object)chaControl.objExtraAccessory[index2], (Object)null) && (index2 == 3 ? (index1 >= 2 ? (!Object.op_Inequality((Object)this.hSceneManager.Player, (Object)null) || !Object.op_Equality((Object)this.hSceneManager.Player.ChaControl, (Object)chaControl) ? chaControl.objExtraAccessory[index2].get_activeSelf() : this.hSceneManager.Player.EquipedItem != null && Object.op_Inequality((Object)this.hSceneManager.Player.EquipedItem.AsGameObject, (Object)null) && this.hSceneManager.Player.EquipedItem.AsGameObject.get_activeSelf()) : (index1 != 1 || !Object.op_Inequality((Object)this.hSceneManager.Player, (Object)null) || !Object.op_Equality((Object)this.hSceneManager.Player.ChaControl, (Object)chaControl) ? this.hSceneManager.FemaleLumpActive[index1] : this.hSceneManager.Player.EquipedItem != null && Object.op_Inequality((Object)this.hSceneManager.Player.EquipedItem.AsGameObject, (Object)null) && this.hSceneManager.Player.EquipedItem.AsGameObject.get_activeSelf())) : chaControl.objExtraAccessory[index2].get_activeSelf());
             }
         }
     }
     this.sbAcsName = new StringBuilder();
     this.SetAccessoryCharacter(true);
     // ISSUE: method pointer
     this.hSceneSpriteChaChoice.SetAction(new UnityAction((object)this, __methodptr(\u003CInit\u003Em__0)));
 }
Пример #9
0
        public static void HScene_SetStartVoice_ApplyClothesConfig(HScene __instance)
        {
            hScene = __instance;

            var traverse = Traverse.Create(hScene);

            manager = traverse.Field("hSceneManager").GetValue <HSceneManager>();

            if (manager != null && manager.Player != null)
            {
                player = manager.Player.ChaControl;
            }

            var hData = Manager.Config.HData;

            foreach (var kind in clothesKindList.Where(kind => player.IsClothesStateKind(kind)))
            {
                player.SetClothesState(kind, (byte)(hData.Cloth ? 0 : 2), true);
            }

            player.SetAccessoryStateAll(hData.Accessory);
            player.SetClothesState(7, (byte)(!hData.Shoes ? 2 : 0), true);
        }
Пример #10
0
        static void SetupHResourceTables(HSceneManager __instance)
        {
            HAutoCtrl.HAutoInfo autoInfo = new HAutoCtrl.HAutoInfo();
            autoInfo.start.minmax            = new Vector2(HS2TakeChargePlugin.StartWaitMin.Value, HS2TakeChargePlugin.StartWaitMax.Value);
            autoInfo.start.time              = (HS2TakeChargePlugin.StartWaitMin.Value + HS2TakeChargePlugin.StartWaitMax.Value) / 2;
            autoInfo.reStart.minmax          = new Vector2(HS2TakeChargePlugin.RestartWaitMin.Value, HS2TakeChargePlugin.RestartWaitMax.Value);
            autoInfo.reStart.time            = (HS2TakeChargePlugin.RestartWaitMin.Value + HS2TakeChargePlugin.RestartWaitMax.Value) / 2;
            autoInfo.speed.minmax            = new Vector2(3, 8);
            autoInfo.speed.time              = 5;
            autoInfo.lerpTimeSpeed           = 2f;
            autoInfo.loopChange.minmax       = new Vector2(HS2TakeChargePlugin.LoopChangeWaitMin.Value, HS2TakeChargePlugin.LoopChangeWaitMax.Value);
            autoInfo.loopChange.time         = (HS2TakeChargePlugin.LoopChangeWaitMax.Value + HS2TakeChargePlugin.LoopChangeWaitMin.Value) / 2;
            autoInfo.motionChange.minmax     = new Vector2(HS2TakeChargePlugin.PositionChangeWaitMin.Value, HS2TakeChargePlugin.PositionChangeWaitMax.Value);
            autoInfo.motionChange.time       = (HS2TakeChargePlugin.PositionChangeWaitMax.Value + HS2TakeChargePlugin.PositionChangeWaitMin.Value) / 2;
            autoInfo.rateWeakLoop            = 50;
            autoInfo.rateHit                 = 50;
            autoInfo.rateAddMotionChange     = 10;
            autoInfo.rateRestartMotionChange = HS2TakeChargePlugin.ChanceToRestartPosition.Value;
            autoInfo.pull.minmax             = new Vector2(HS2TakeChargePlugin.PulloutWaitMin.Value, HS2TakeChargePlugin.PulloutWaitMax.Value);
            autoInfo.pull.time               = (HS2TakeChargePlugin.PulloutWaitMin.Value + HS2TakeChargePlugin.PulloutWaitMax.Value) / 2;
            autoInfo.rateInsertPull          = HS2TakeChargePlugin.InsertedChanceToPullOut.Value;
            autoInfo.rateNotInsertPull       = HS2TakeChargePlugin.NonInsertedChanceToPullOut.Value;

            HAutoCtrl.AutoLeaveItToYou autoLeaveItToYou = new HAutoCtrl.AutoLeaveItToYou();
            autoLeaveItToYou.time.minmax = new Vector2(30, 50);
            autoLeaveItToYou.time.Reset();
            autoLeaveItToYou.baseTime = autoLeaveItToYou.time.minmax;
            autoLeaveItToYou.rate     = 50;

            HSceneManager.HResourceTables.HAutoInfo         = autoInfo;
            HSceneManager.HResourceTables.HAutoLeaveItToYou = autoLeaveItToYou;

            SpankTimer        = new HAutoCtrl.AutoTime();
            SpankTimer.minmax = new Vector2(HS2TakeChargePlugin.SpankingWaitMin.Value, HS2TakeChargePlugin.SpankingWaitMax.Value);
            SpankTimer.time   = (HS2TakeChargePlugin.SpankingWaitMin.Value + HS2TakeChargePlugin.SpankingWaitMax.Value);
            SpankTimer.Reset();
        }
    public void Init()
    {
        this.hScene        = (HScene)((Component)Singleton <HSceneFlagCtrl> .Instance).GetComponent <HScene>();
        this.femailes      = this.hScene.GetFemales();
        this.hSceneManager = Singleton <HSceneManager> .Instance;
        // ISSUE: method pointer
        ((UnityEvent)this.Sort.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CInit\u003Em__2)));
        // ISSUE: method pointer
        ((UnityEvent)this.SortUpDown[0].get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CInit\u003Em__3)));
        // ISSUE: method pointer
        ((UnityEvent)this.SortUpDown[1].get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CInit\u003Em__4)));
        // ISSUE: method pointer
        ((UnityEvent)this.cross.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CInit\u003Em__5)));
        this.lstCoordinatesBase = CustomClothesFileInfoAssist.CreateClothesFileInfoList(false, true, true, true);
        this.lstCoordinates.Clear();
        for (int index = 0; index < this.lstCoordinatesBase.Count; ++index)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            HSceneSpriteCoordinatesCard.\u003CInit\u003Ec__AnonStorey0 initCAnonStorey0 = new HSceneSpriteCoordinatesCard.\u003CInit\u003Ec__AnonStorey0();
            // ISSUE: reference to a compiler-generated field
            initCAnonStorey0.\u0024this = this;
            // ISSUE: reference to a compiler-generated field
            initCAnonStorey0.no = index;
            HSceneSpriteCoordinatesNode spriteCoordinatesNode = (HSceneSpriteCoordinatesNode)Object.Instantiate <HSceneSpriteCoordinatesNode>((M0)this.CoordinatesNode, this.Content);
            ((Component)spriteCoordinatesNode).get_gameObject().SetActive(true);
            this.lstCoordinates.Add(spriteCoordinatesNode);
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            this.lstCoordinates[initCAnonStorey0.no].id = initCAnonStorey0.no;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            this.lstCoordinates[initCAnonStorey0.no].coodeName.set_text(this.lstCoordinatesBase[initCAnonStorey0.no].name);
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            this.lstCoordinates[initCAnonStorey0.no].CreateCoodeTime = this.lstCoordinatesBase[initCAnonStorey0.no].time;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: method pointer
            ((UnityEvent)((Button)((Component)this.lstCoordinates[initCAnonStorey0.no]).GetComponent <Button>()).get_onClick()).AddListener(new UnityAction((object)initCAnonStorey0, __methodptr(\u003C\u003Em__0)));
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            this.lstCoordinates[initCAnonStorey0.no].image = (Image)((Component)this.lstCoordinates[initCAnonStorey0.no]).GetComponent <Image>();
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            this.lstCoordinates[initCAnonStorey0.no].fileName = this.lstCoordinatesBase[initCAnonStorey0.no].FileName;
        }
        PointerEnterTrigger pointerEnterTrigger1 = (PointerEnterTrigger)null;

        UITrigger.TriggerEvent triggerEvent1       = new UITrigger.TriggerEvent();
        PointerExitTrigger     pointerExitTrigger1 = (PointerExitTrigger)null;

        UITrigger.TriggerEvent triggerEvent2 = new UITrigger.TriggerEvent();
        for (int index = 0; index < this.lstSortCategory.Count; ++index)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            HSceneSpriteCoordinatesCard.\u003CInit\u003Ec__AnonStorey1 initCAnonStorey1 = new HSceneSpriteCoordinatesCard.\u003CInit\u003Ec__AnonStorey1();
            // ISSUE: reference to a compiler-generated field
            initCAnonStorey1.\u0024this = this;
            // ISSUE: reference to a compiler-generated field
            initCAnonStorey1.no = index;
            // ISSUE: reference to a compiler-generated field
            ((UnityEventBase)this.lstSortCategory[initCAnonStorey1.no].onValueChanged).RemoveAllListeners();
            // ISSUE: reference to a compiler-generated field
            // ISSUE: method pointer
            ((UnityEvent <bool>) this.lstSortCategory[initCAnonStorey1.no].onValueChanged).AddListener(new UnityAction <bool>((object)initCAnonStorey1, __methodptr(\u003C\u003Em__0)));
            pointerEnterTrigger1 = (PointerEnterTrigger)null;
            UITrigger.TriggerEvent triggerEvent3 = new UITrigger.TriggerEvent();
            // ISSUE: reference to a compiler-generated field
            PointerEnterTrigger pointerEnterTrigger2 = (PointerEnterTrigger)((Component)this.lstSortCategory[initCAnonStorey1.no]).get_gameObject().GetComponent <PointerEnterTrigger>();
            if (Object.op_Equality((Object)pointerEnterTrigger2, (Object)null))
            {
                // ISSUE: reference to a compiler-generated field
                pointerEnterTrigger2 = (PointerEnterTrigger)((Component)this.lstSortCategory[initCAnonStorey1.no]).get_gameObject().AddComponent <PointerEnterTrigger>();
            }
            if (((UITrigger)pointerEnterTrigger2).get_Triggers().Count > 0)
            {
                ((UITrigger)pointerEnterTrigger2).get_Triggers().Clear();
            }
            ((UITrigger)pointerEnterTrigger2).get_Triggers().Add(triggerEvent3);
            // ISSUE: method pointer
            ((UnityEvent <BaseEventData>)triggerEvent3).AddListener(new UnityAction <BaseEventData>((object)initCAnonStorey1, __methodptr(\u003C\u003Em__1)));
            pointerExitTrigger1 = (PointerExitTrigger)null;
            UITrigger.TriggerEvent triggerEvent4 = new UITrigger.TriggerEvent();
            // ISSUE: reference to a compiler-generated field
            PointerExitTrigger pointerExitTrigger2 = (PointerExitTrigger)((Component)this.lstSortCategory[initCAnonStorey1.no]).get_gameObject().GetComponent <PointerExitTrigger>();
            if (Object.op_Equality((Object)pointerExitTrigger2, (Object)null))
            {
                // ISSUE: reference to a compiler-generated field
                pointerExitTrigger2 = (PointerExitTrigger)((Component)this.lstSortCategory[initCAnonStorey1.no]).get_gameObject().AddComponent <PointerExitTrigger>();
            }
            if (((UITrigger)pointerExitTrigger2).get_Triggers().Count > 0)
            {
                ((UITrigger)pointerExitTrigger2).get_Triggers().Clear();
            }
            ((UITrigger)pointerExitTrigger2).get_Triggers().Add(triggerEvent4);
            // ISSUE: method pointer
            ((UnityEvent <BaseEventData>)triggerEvent4).AddListener(new UnityAction <BaseEventData>((object)initCAnonStorey1, __methodptr(\u003C\u003Em__2)));
        }
        this.ListSort(0);
        // ISSUE: method pointer
        ((UnityEvent)this.BeforeCoode.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CInit\u003Em__6)));
        // ISSUE: method pointer
        ((UnityEvent)this.DecideCoode.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CInit\u003Em__7)));
        // ISSUE: method pointer
        this.hSceneSpriteChaChoice.SetAction(new UnityAction((object)this, __methodptr(\u003CInit\u003Em__8)));
    }
        public static void Postfix_HScene_Update(HScene __instance, ref HSceneManager ___hSceneManager, ref int ___mode, ref int ___modeCtrl)
        {
            if (__instance.NowStateIsEnd)
            {
                return;
            }

            HSceneFlagCtrl flagCtrl = __instance.ctrlFlag;

            if (flagCtrl.selectAnimationListInfo != null)
            {
                return;
            }


            // Sleep Sex

            bool isSleepSex = ___hSceneManager.EventKind == HSceneManager.HEvent.Yobai;

            if (isSleepSex)
            {
                if (ChangeSleepSex.Value)
                {
                    bool flagM = flagCtrl.feel_m > feelM;
                    bool flagF = flagCtrl.feel_f > feelF;

                    if (flagM)
                    {
                        wakeChance += (flagCtrl.feel_m - feelM) * wakeRate * 100f;
                    }

                    if (flagF)
                    {
                        wakeChance += (flagCtrl.feel_f - feelF) * wakeRate * 100f;
                    }

                    if (!flagM && !flagF)
                    {
                        wakeChance -= WakeDecay.Value * Time.deltaTime;
                    }

                    wakeChance = Mathf.Clamp(wakeChance, 0f, WakeChance.Value);

                    feelM = flagCtrl.feel_m;
                    feelF = flagCtrl.feel_f;
                }
                else
                {
                    wakeChance = WakeChance.Value;
                }

                flagCtrl.YobaiBareRate = (int)wakeChance;
            }
            else
            {
                wakeChance = flagCtrl.YobaiBareRate;
            }


            // Partner Check

            bool partnerCan = flagCtrl.feel_f >= partnerMeter;

            partnerAt = GetMeterAt(partnerCan, partnerMeter, partnerAt);

            if (partnerCan && flagCtrl.feel_f >= partnerAt)
            {
                switch (___mode)
                {
                case 0:
                case 4:
                case 6:
                    flagCtrl.feel_f = 1f;

                    return;

                case 2:
                case 7:
                    if (BothCan(flagCtrl))
                    {
                        flagCtrl.feel_f = flagCtrl.feel_m = 0.9f;
                        flagCtrl.click  = HSceneFlagCtrl.ClickKind.FinishSame;
                    }
                    else
                    {
                        flagCtrl.feel_f = 1f;
                    }

                    return;
                }
            }


            // Player Check

            bool playerCan = flagCtrl.feel_m >= playerMeter;

            playerAt = GetMeterAt(playerCan, playerMeter, playerAt);

            if (playerCan && flagCtrl.feel_m >= playerAt)
            {
                switch (___mode)
                {
                case 1:
                    flagCtrl.feel_m = 0.9f;

                    switch (___modeCtrl)
                    {
                    case 0:
                        flagCtrl.click = HSceneFlagCtrl.ClickKind.FinishOutSide;

                        return;

                    case 1:
                        if (mouthChance >= Random.value)
                        {
                            if (drinkChance >= Random.value)
                            {
                                flagCtrl.click = HSceneFlagCtrl.ClickKind.FinishDrink;
                            }
                            else
                            {
                                flagCtrl.click = HSceneFlagCtrl.ClickKind.FinishVomit;
                            }
                        }
                        else
                        {
                            flagCtrl.click = HSceneFlagCtrl.ClickKind.FinishOutSide;
                        }

                        return;
                    }

                    break;

                case 2:
                case 7:
                    flagCtrl.feel_m = 0.9f;

                    if (BothCan(flagCtrl))
                    {
                        flagCtrl.feel_f = 0.9f;
                        flagCtrl.click  = HSceneFlagCtrl.ClickKind.FinishSame;
                    }
                    else if (flagCtrl.isInsert && insideChance >= Random.value)
                    {
                        flagCtrl.click = HSceneFlagCtrl.ClickKind.FinishInSide;
                    }
                    else
                    {
                        flagCtrl.click = HSceneFlagCtrl.ClickKind.FinishOutSide;
                    }

                    return;
                }
            }
        }
Пример #13
0
        public static void Update()
        {
            if (!HSceneManager.IsInstance())
            {
                return;
            }

            if (!HSceneManager.isHScene)
            {
                if (lstAnimInfo != null)
                {
                    lstAnimInfo = null;
                }

                return;
            }

            int category = -1;

            if (CaressKey.Value.IsDown())
            {
                category = 0;
            }
            else if (ServiceKey.Value.IsDown())
            {
                category = 1;
            }
            else if (IntercourseKey.Value.IsDown())
            {
                category = 2;
            }
            else if (SpecialKey.Value.IsDown())
            {
                category = 3;
            }
            else if (LesbianKey.Value.IsDown())
            {
                category = 4;
            }
            else if (GroupKey.Value.IsDown())
            {
                category = 5;
            }

            if (category != -1)
            {
                if (HSceneFlagCtrl.Instance.selectAnimationListInfo == null)
                {
                    if (lstAnimInfo == null)
                    {
                        GenerateList();
                    }

                    if (lstAnimInfo != null && category < lstAnimInfo.Length)
                    {
                        List <HScene.AnimationListInfo> list = lstAnimInfo[category];

                        if (list != null && list.Count > 0)
                        {
                            HScene.AnimationListInfo next = list[UnityEngine.Random.Range(0, list.Count)];
                            HSceneFlagCtrl.Instance.selectAnimationListInfo = next;

                            MapUIContainer.AddNotify($"Next Animation: {next.nameAnimation}");
                        }
                        else
                        {
                            MapUIContainer.AddNotify("No animations available for this category.");
                        }
                    }
                    else
                    {
                        MapUIContainer.AddNotify("This category is not available during this scene.");
                    }
                }
                else
                {
                    MapUIContainer.AddNotify("Next animation is already being loaded.");
                }
            }
        }
 public void Init()
 {
     this.hScene        = (HScene)((Component)Singleton <HSceneFlagCtrl> .Instance).GetComponent <HScene>();
     this.hSceneManager = Singleton <HSceneManager> .Instance;
     this.females       = this.hScene.GetFemales();
     this.Males         = this.hScene.GetMales();
     this.actor         = new Actor[4];
     for (int index = 0; index < this.charlist.Length; ++index)
     {
         // ISSUE: object of a compiler-generated type is created
         // ISSUE: variable of a compiler-generated type
         HSceneSpriteChaChoice.\u003CInit\u003Ec__AnonStorey0 initCAnonStorey0 = new HSceneSpriteChaChoice.\u003CInit\u003Ec__AnonStorey0();
         // ISSUE: reference to a compiler-generated field
         initCAnonStorey0.\u0024this = this;
         // ISSUE: reference to a compiler-generated field
         initCAnonStorey0.no = index;
         // ISSUE: reference to a compiler-generated field
         // ISSUE: reference to a compiler-generated field
         // ISSUE: reference to a compiler-generated field
         // ISSUE: reference to a compiler-generated field
         // ISSUE: reference to a compiler-generated field
         bool flag = initCAnonStorey0.no >= 2 ? Object.op_Inequality((Object)this.Males[initCAnonStorey0.no - 2], (Object)null) && Object.op_Inequality((Object)this.Males[initCAnonStorey0.no - 2].objTop, (Object)null) : Object.op_Inequality((Object)this.females[initCAnonStorey0.no], (Object)null) && Object.op_Inequality((Object)this.females[initCAnonStorey0.no].objTop, (Object)null);
         // ISSUE: reference to a compiler-generated field
         ((Component)this.charlist[initCAnonStorey0.no]).get_gameObject().SetActive(flag);
         if (flag)
         {
             // ISSUE: reference to a compiler-generated field
             // ISSUE: reference to a compiler-generated field
             // ISSUE: reference to a compiler-generated field
             // ISSUE: reference to a compiler-generated field
             this.actor[initCAnonStorey0.no] = initCAnonStorey0.no >= 2 ? (Actor)((Component)this.Males[initCAnonStorey0.no - 2]).GetComponentInParent <Actor>() : (Actor)((Component)this.females[initCAnonStorey0.no]).GetComponentInParent <Actor>();
             // ISSUE: reference to a compiler-generated field
             if (initCAnonStorey0.no == 0)
             {
                 Text labelText = this.LabelText;
                 // ISSUE: reference to a compiler-generated field
                 // ISSUE: reference to a compiler-generated field
                 // ISSUE: reference to a compiler-generated field
                 string str1 = !Object.op_Implicit((Object)this.actor[initCAnonStorey0.no]) ? ((Object)this.charlist[initCAnonStorey0.no]).get_name() : this.actor[initCAnonStorey0.no].CharaName;
                 // ISSUE: reference to a compiler-generated field
                 ((Text)((Component)this.charlist[initCAnonStorey0.no]).GetComponentInChildren <Text>()).set_text(str1);
                 string str2 = str1;
                 labelText.set_text(str2);
             }
             else
             {
                 // ISSUE: reference to a compiler-generated field
                 // ISSUE: reference to a compiler-generated field
                 // ISSUE: reference to a compiler-generated field
                 // ISSUE: reference to a compiler-generated field
                 ((Text)((Component)this.charlist[initCAnonStorey0.no]).GetComponentInChildren <Text>()).set_text(!Object.op_Implicit((Object)this.actor[initCAnonStorey0.no]) ? ((Object)this.charlist[initCAnonStorey0.no]).get_name() : this.actor[initCAnonStorey0.no].CharaName);
             }
         }
         // ISSUE: reference to a compiler-generated field
         // ISSUE: method pointer
         ((UnityEvent)this.charlist[initCAnonStorey0.no].get_onClick()).AddListener(new UnityAction((object)initCAnonStorey0, __methodptr(\u003C\u003Em__0)));
     }
     // ISSUE: method pointer
     ((UnityEvent)this.OpenCharList[0].get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CInit\u003Em__0)));
     // ISSUE: method pointer
     ((UnityEvent)this.OpenCharList[1].get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CInit\u003Em__1)));
 }