Exemplo n.º 1
0
 public void Update()
 {
     // 前回よりも角度の差が大きい場合はリセットする
     bReset = false;
     if (tbody != null)
     {
         Maid maid = tbody.maid;
         if (maid != null)
         {
             jiggleBone jbMuneL = (jiggleBone)Helper.GetInstanceField(typeof(TBody), tbody, "jbMuneL");
             if (jbMuneL.boWarpInit)
             {
                 bReset = true;
             }
         }
     }
 }
Exemplo n.º 2
0
 public static Undo createUndoSecret(jiggleBone _jMune, float _updown, float _yori)
 {
     return(new Undo(() =>
     {
         if (_jMune != null && _jMune.gameObject.activeInHierarchy == true)
         {
             float tempud = _jMune.MuneUpDown;
             float _tempy = _jMune.MuneYori;
             _jMune.MuneUpDown = _updown;
             _jMune.MuneYori = _yori;
             return createUndoSecret(_jMune, tempud, _tempy);
         }
         else
         {
             return null;
         }
     }));
 }
Exemplo n.º 3
0
        public static Undo createUndoSecretBoth(jiggleBone _jMuneR, float _updownR, float _yoriR, jiggleBone _jMuneL, float _updownL, float _yoriL)
        {
            return(new Undo(() =>
            {
                if (_jMuneR != null && _jMuneR.gameObject.activeInHierarchy == true && _jMuneL != null && _jMuneL.gameObject.activeInHierarchy == true)
                {
                    float tempudR = _jMuneR.MuneUpDown;
                    float _tempyR = _jMuneR.MuneYori;
                    _jMuneR.MuneUpDown = _updownR;
                    _jMuneR.MuneYori = _yoriR;

                    float tempudL = _jMuneL.MuneUpDown;
                    float _tempyL = _jMuneL.MuneYori;
                    _jMuneL.MuneUpDown = _updownL;
                    _jMuneL.MuneYori = _yoriL;
                    return createUndoSecretBoth(_jMuneR, tempudR, _tempyR, _jMuneL, tempudL, _tempyL);
                }
                else
                {
                    return null;
                }
            }));
        }
Exemplo n.º 4
0
        public void Touch(string part, ActivityType activity)
        {
            if ((activity == ActivityType.Click) && (part == "target_mune"))
            {
                this._jbMuneL = TouchCommunication.GetFieldValue<TBody, jiggleBone>(this._maid.body0, "jbMuneL");
                this._jbMuneR = TouchCommunication.GetFieldValue<TBody, jiggleBone>(this._maid.body0, "jbMuneR");

                /// Gây tăng động cho bone
                if (this._jbMuneL != null)
                {
                    this._jbMuneL.bGravity = 0.3f;
                    this._jbMuneL.bDamping = 0.3f;
                    this._jbMuneR.bGravity = 0.3f;
                    this._jbMuneR.bDamping = 0.3f;
                    this._mureYureTimer = 10;
                }
            }
            this._preExciteLevel = this.ExciteLevel;
            int num = 0;
            if (part == "target_mune")
            {
                num = 7;
            }
            else if (part == "target_hip")
            {
                num = 5;
            }
            else if (part == "target_vagina")
            {
                num = 9;
            }
            this._maid.Param.AddCurExcite(num);
            if (!this.Waiting)
            {
                this.ChangeFace(true);
                this._isFaceChanged = true;
                if (this.ExciteLevel == 4)
                {
                    this.Speak(part, ActivityType.Click);
                }
                else
                {
                    this.Speak(part, activity);
                }
                if (this.ExciteLevel == 4)
                {
                    if (string.IsNullOrEmpty(this.OriginalPose))
                    {
                        this.OriginalPose = this._maid.body0.LastAnimeFN;
                    }
                    // Nếu dc cho phép trong Hscene mới dc ra
                    if (ControlSignal._isAllowIkumInHScene)
                    {
                        if (part == "target_vagina")
                        {
                            this._maid.CrossFade("aibu_cli_seikantaizeccyou_f_once_.anm", false, false, false, 1f, 1f);
                            this._maid.CrossFade("aibu_zeccyougo_f.anm", false, true, true, 0.5f, 1f);
                        }
                        else if (part == "target_mune")
                        {
                            this._maid.CrossFade("aibu_tikubi_seikantaizeccyou_f_once_.anm", false, false, false, 1f, 1f);
                            this._maid.CrossFade("aibu_tikubi_seikantaizeccyougo_f.anm", false, true, true, 0.5f, 1f);
                        }
                        else
                        {
                            this._maid.CrossFade("aibu_hibu_zeccyou_f_once_.anm", false, false, false, 3f, 1f);
                            this._maid.CrossFade("aibu_zeccyougo_f.anm", false, true, true, 0.5f, 1f);
                        }
                        this._maid.AddPrefab("Particle/pSio2_cm3D2", "pSio2_cm3D2", "_IK_vagina", new Vector3(0f, 0f, -0.01f), new Vector3(0f, 180f, 0f));
                        if ((part == "target_vagina") && TouchCommunication.GetRandomBool(50))
                        {
                            this._maid.AddPrefab("Particle/pNyou_cm3D2", "pNyou_cm3D2", "_IK_vagina", new Vector3(0f, -0.047f, 0.011f), new Vector3(20f, -180f, 180f));
                            GameMain.Instance.SoundMgr.PlaySe("SE011.ogg", false);
                        }
                        this.PersistPoseSeconds = 15;
                        this.Waiting = true;
                    }

                }
                else if ((this.PersistPoseSeconds == -1) && (activity == ActivityType.Click))
                {
                    Predicate<string> match = null;
                    Predicate<string> predicate2 = null;
                    string search;
                    this.OriginalPose = this._maid.body0.LastAnimeFN;
                    string[] strArray = Path.GetFileNameWithoutExtension(this.OriginalPose).Split(new char[] { '_' });
                    if (strArray.Length == 1)
                    {
                        search = strArray[0];
                    }
                    else if (strArray.Length > 1)
                    {
                        search = strArray[0] + "_" + strArray[1];
                    }
                    else
                    {
                        search = "";
                    }
                    if (TouchCommunication.GetRandomBool(50) && (this.ExciteLevel <= 1))
                    {
                        if (match == null)
                        {
                            match = m => m.Contains("itazura_once") && m.Contains(search);
                        }
                        string str = TouchCommunication.motions.Find(match);
                        if (str != null)
                        {
                            this._maid.CrossFade(str + ".anm", false, false, false, 0.5f, 1f);
                            this.PersistPoseSeconds = 5;
                        }
                        if (predicate2 == null)
                        {
                            predicate2 = m => m.Contains("itazurago") && m.Contains(search);
                        }
                        string str2 = TouchCommunication.motions.Find(predicate2);
                        if (str2 != null)
                        {
                            this._maid.CrossFade(str2 + ".anm", false, true, true, 1f, 1f);
                        }
                    }
                }
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// 胸サイズ変更処理
 /// </summary>
 void jiggleBonePreLateUpdateSelef(jiggleBone jiggleBone)
 {
     jiggleBoneScaleBackUp = jiggleBone.transform.localScale;
 }
Exemplo n.º 6
0
        public static Undo createUndoAll(Maid _maid, Dictionary <Transform, Quaternion> _qBone, Vector3 _vPos,
                                         Vector3 _vAllPos, Vector3 _vAllRot, Vector3 _offsetP, Vector3 _offsetR,
                                         Quaternion _qEyeR, Quaternion _qEyeL,
                                         jiggleBone _jMuneR, float _updownR, float _yoriR, jiggleBone _jMuneL, float _updownL, float _yoriL)
        {
            return(new Undo(() =>
            {
                if (_maid != null && _maid.Visible == true && _jMuneR != null && _jMuneR.gameObject.activeInHierarchy == true && _jMuneL != null && _jMuneL.gameObject.activeInHierarchy == true)
                {
                    //対象ボーンが消えてないかチェック
                    if (_qBone.Any(n => (n.Key == null && n.Key.gameObject.activeInHierarchy == false)))
                    {
                        return null;
                    }

                    //現在の状態を元にRedo要素を作成
                    Dictionary <Transform, Quaternion> re_qBonelocal = _qBone.ToDictionary(n => n.Key, n => n.Key.localRotation);
                    Vector3 _tempPos = _qBone.Where(n => n.Key.name == "Bip01").First().Key.localPosition;

                    //状態復元
                    foreach (KeyValuePair <Transform, Quaternion> pair in _qBone)
                    {
                        pair.Key.localRotation = pair.Value;
                        if (pair.Key.name == "Bip01")
                        {
                            pair.Key.localPosition = _vPos;
                        }
                    }

                    Vector3 _tempAllP = GameMain.Instance.CharacterMgr.GetCharaAllPos();

                    GameMain.Instance.CharacterMgr.SetCharaAllPos(_vAllPos);

                    Vector3 _tempAllR = GameMain.Instance.CharacterMgr.GetCharaAllRot();

                    GameMain.Instance.CharacterMgr.SetCharaAllRot(_vAllRot);

                    Vector3 _tempOffsetP = _maid.transform.localPosition;

                    _maid.SetPos(_offsetP);

                    Vector3 _tempOffsetR = _maid.GetRot();

                    _maid.SetRot(_offsetR);

                    Quaternion eyeR = _maid.body0.quaDefEyeR;
                    _maid.body0.quaDefEyeR = _qEyeR;

                    Quaternion eyeL = _maid.body0.quaDefEyeL;
                    _maid.body0.quaDefEyeL = _qEyeL;

                    float tempudR = _jMuneR.MuneUpDown;
                    float _tempyR = _jMuneR.MuneYori;
                    _jMuneR.MuneUpDown = _updownR;
                    _jMuneR.MuneYori = _yoriR;

                    float tempudL = _jMuneL.MuneUpDown;
                    float _tempyL = _jMuneL.MuneYori;
                    _jMuneL.MuneUpDown = _updownL;
                    _jMuneL.MuneYori = _yoriL;

                    return createUndoAll(_maid, re_qBonelocal, _tempPos,
                                         _tempAllP, _tempAllR, _tempOffsetP, _tempOffsetR,
                                         eyeR, eyeL, _jMuneR, tempudR, _tempyR, _jMuneL, tempudL, _tempyL);
                }
                else
                {
                    return null;
                }
            }));
        }