//ステータス変更 private void Change_To_Beetle_Status() { transform.SetParent(main_Camera.transform); //カメラの子に _controller.Change_Animation("RideBeetleBool"); //アニメーション GetComponent <Rigidbody2D>().gravityScale = 0; //重力 body_Collision.Change_Collider_Size(new Vector2(6f, 6f)); //当たり判定 body_Collision.Display_Sprite(); beetle_Body.SetActive(true); main_Camera.GetComponent <CameraController>().Start_Auto_Scroll(scroll_Speed); //オートスクロール }
//しゃがむ public void Squat() { if (_controller.is_Squat) { return; } _controller.is_Squat = true; _controller.Change_Animation("SquatBool"); player_Body.Change_Collider_Size(new Vector2(10, 12), new Vector2(0, -6)); }
//ステータス変更 private void Change_To_Beetle_Status() { transform.rotation = Quaternion.Euler(new Vector3(0, 0, 0)); //回転 transform.SetParent(main_Camera.transform); //カメラの子に GetComponent <Rigidbody2D>().gravityScale = 0; //重力 body_Collision.Change_Collider_Size(new Vector2(6f, 6f), default_Collider_Offset); //当たり判定 body_Collision.Display_Sprite(); foot_Collision.Disappear(); beetle_Body.SetActive(true); Change_Scroll_Speed_By_Power(); //オートスクロール GetComponent <PlayerTransitionRidingBeetle>().Change_Body_Direction((int)transform.localScale.x); //向きの固定 }
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; }