// 第四个技能方法 private IEnumerator StartSquareMoveCycleShot(float totalTime) { float time = 0.0f; int index; bool dirty = false; if (baseNumber * 3 >= 36) { baseNumber = 36; } else { baseNumber *= 3; } while (true) { index = m_Shot.StartMoreRotationLines(bullet_Common, bullets, baseNumber, 90, baseSpeed, 0.1f); yield return(new WaitForSeconds(2.0f)); m_Shot.StopCoroutineWithIndex(index); if (!dirty && baseNumber <= 18) { baseNumber *= 2; dirty = true; } time += 2.0f; if (time >= totalTime) { break; } } }
private IEnumerator SkillShip_2(GameObject obj, float shotTime) { BulletShotHelper m_shot = obj.GetComponent <BulletShotHelper>(); int index = m_shot.StartMoreRotationLines(bullet, bullets, 12, 20, 50, 0.1f); yield return(new WaitForSeconds(shotTime)); m_shot.StopCoroutineWithIndex(index); }