//しゃがみ解除 public void Release_Squat() { if (_controller.is_Squat) { _controller.is_Squat = false; player_Body.Back_Default_Collider(); } }
//ステータス変更 private void Change_To_Default_Status() { string anim_Parm = _controller.is_Landing ? "IdleBool" : "JumpBool"; //アニメーション _controller.Change_Animation(anim_Parm); transform.rotation = Quaternion.Euler(new Vector3(0, 0, 0)); //回転 transform.SetParent(null); //親子関係解除 GetComponent <Rigidbody2D>().gravityScale = default_Gravity; //重力 body_Collision.Back_Default_Collider(); //当たり判定 body_Collision.Hide_Sprite(); foot_Collision.Appear(); beetle_Body.SetActive(false); main_Camera.GetComponent <CameraController>().Quit_Auto_Scroll();//オートスクロール }
private IEnumerator Kick_Cor(Kind kind) { accept_Input = false; //入力受付後500フレーム以内にキック可能になればキック float loop_Count = 0; while (!_controller.can_Attack) { yield return(null); loop_Count++; if (loop_Count > 500) { accept_Input = true; yield break; } } //キック開始 _controller.can_Attack = false; _controller.Set_Is_Playable(false); _controller.Change_Animation("KickBool"); player_Body.Change_Collider_Size(new Vector2(10, 12), new Vector2(0, -6)); player_SE.Play_Kick_Sound(); if (kind == Kind.kick || kind == Kind.sliding) { kick_Collision.Make_Collider_Appear(false); StartCoroutine("Kicking_Cor"); } else { kick_Collision.Make_Collider_Appear(true); player_SE.Play_Charge_Shoot_Sound(); Quit_Charge(true); player_Body.Become_Invincible(); StartCoroutine("Charge_Kicking_Cor"); } yield return(new WaitUntil(End_Kick)); //キック終了 if (_controller.is_Landing) { _controller.Change_Animation("IdleBool"); } else { _controller.Change_Animation("JumpBool"); } _controller.Set_Is_Playable(true); kick_Collision.Make_Collider_Disappear(); player_Body.Back_Default_Collider(); if (kind == Kind.charge_Kick || kind == Kind.charge_Sliding) { player_Body.Release_Invincible(); } _controller.can_Attack = true; accept_Input = true; }