//空中斬撃用 public IEnumerator Shoot_Jump_Slash_Cor(int num) { List <GameObject> bullet_List = new List <GameObject>(); Vector3 pos = transform.position + new Vector3(transform.parent.localScale.x * -24f, 0); //弾の生成 for (int i = 0; i < num; i++) { var bullet = ObjectPoolManager.Instance.Get_Pool(yellow_Rice_Bullet).GetObject(); bullet.transform.position = pos + new Vector3(0, -21f + i * 1.7f); bullet.transform.rotation = new Quaternion(0, 0, 0, 0); bullet_List.Add(bullet); yield return(new WaitForSeconds(0.16f / num)); } yield return(new WaitForSeconds(0.3f)); //回転と加速 float angle = 0, speed = 0; for (int i = 0; i < num; i++) { if (bullet_List[i].activeSelf == false) { continue; } angle = Random.Range(-180f, 180f); bullet_List[i].transform.Rotate(new Vector3(0, 0, angle)); speed = Random.Range(0.6f, 1.5f); bullet_List[i].GetComponent <Rigidbody2D>().velocity = bullet_List[i].transform.right * speed; } _accelerator.Accelerat_Bullet(bullet_List, 1.05f, 1.5f); UsualSoundManager.Instance.Play_Shoot_Sound(); nemuno_Controller.Play_Burst_Effect(); }
//サビ private IEnumerator Phase1_Melody_Main_Cor(NemunoBGMTimeKeeper _BGM) { //弾幕前溜め _attack_Func.StartCoroutine("High_Jump_Cor", -1); yield return(new WaitUntil(_attack_Func.Is_End_Move)); //サビ開始までの時間を計算 float wait_Time = _BGM.BGM_Time_Keeper[4] - (Time.unscaledTime - _BGM.Get_BGM_Launch_Time()) % _BGM.BGM_Time_Keeper[5]; if (wait_Time < 0 || wait_Time > 10) { wait_Time = 2.0f; } transform.localScale = new Vector3(1, 1, 1); _controller.Play_Charge_Effect(wait_Time); //移動 _controller.Change_Animation("ShootBool"); _controller.Change_Fly_Parameter(); yield return(new WaitForSecondsRealtime(1.03f)); _move_Two_Points.Start_Move(new Vector3(160f, 8f), 4); yield return(new WaitForSeconds(wait_Time - 1.0f)); //弾幕攻撃 _controller.Play_Burst_Effect(); _shoot.Start_Kunai_Shoot(); UsualSoundManager.Instance.Play_Shoot_Sound(); yield return(new WaitForSeconds(10.51f)); if (_BGM.Get_Now_Melody() != NemunoBGMTimeKeeper.Melody.main) { _controller.Change_Land_Paramter(); _controller.Change_Animation("IdleBool"); yield return(new WaitForSeconds(1.38f)); } can_Attack = true; }