Beispiel #1
0
 /// <summary>
 /// ヒップドロップ。空中でvelocity0に。一瞬待って真下に等速運動
 /// </summary>
 private void HipDrop()
 {
     this.StopAllCoroutineOfRotation(); //現在はbackFlipのコルーチンのみ
     //this.IsStickingWall = false;
     this.IsHipDropping      = true;
     this._velocity          = Vector3.zero;
     this.transform.rotation = new Quaternion(0f, this.transform.rotation.y, 0f, this.transform.rotation.w);
     this.currentState       = E_State.HipDropping;
     this._playerAnimation.Play(PlayerAnimation.E_PlayerAnimationType.HipDrop);
     SEManager.Instance.Stop(SEPath.STICKING_WALL);
     SEManager.Instance.Play(SEPath.JUMP_VOICE8, volumeRate: 0.5f);
     SEManager.Instance.Play(SEPath.HIP_DROP_ROTATE);
     //CapsuleCollider _collider = GetComponent<CapsuleCollider>();
     this._hitHeadCheck.localPosition = Vector3.zero;
     this._hitHeadCheck.localRotation = Quaternion.Euler(Vector3.zero);
     this._groundCheck.localPosition  = Vector3.zero;
     this._groundCheck.localRotation  = Quaternion.Euler(Vector3.zero);
     if (this.CountGroundNearFoots == 0) //地面スレスレでないとき
     {
         StartCoroutine(TransformManager.RotateInCertainTimeByAxisFromAway(this.transform, this.CenterPosition, E_TransformAxis.Right, 360f, 0.14f));
         StartCoroutine(TransformManager.RotateInCertainTimeByAxisFromAway(this._hitHeadCheck, this.CenterPosition, E_TransformAxis.Right, -360f, 0.14f));
         StartCoroutine(TransformManager.RotateInCertainTimeByAxisFromAway(this._groundCheck, this.CenterPosition, E_TransformAxis.Right, -360f, 0.14f));
         StartCoroutine(CoroutineManager.DelayMethod(0.15f, () =>
         {
             this._hitHeadCheck.localPosition = Vector3.zero;
             this._hitHeadCheck.localRotation = Quaternion.Euler(Vector3.zero);
             this._groundCheck.localPosition  = Vector3.zero;
             this._groundCheck.localRotation  = Quaternion.Euler(Vector3.zero);
         }));
     }
     StartCoroutine(CoroutineManager.DelayMethod(0.3f, () =>
     {
         this._velocity.y = -1 * this.hipDropVerticalSpeed;
     }));
 }