// 第三个技能 private IEnumerator Skill_3(float totalTime) { float time = 0.0f; int index; bool flag = true; index = m_Shot.StartRotationLines(bullet_Big, bullets, baseNumber, 10, baseSpeed, 0.2f); while (true) { int index_1; index_1 = m_Shot.StartCycleLines(bullet_Common, bullets, baseNumber * 6, 10, flag, baseSpeed, 0.1f); yield return new WaitForSeconds(3.0f); m_Shot.StopCoroutineWithIndex(index_1); time += 3.0f; flag = !flag; if (time >= totalTime) { break; } } m_Shot.StopCoroutineWithIndex(index); }
private IEnumerator SkillShip_3(GameObject obj, float shotTime) { BulletShotHelper m_shot = obj.GetComponent <BulletShotHelper>(); ShipControl m_ShipControl = obj.GetComponent <ShipControl>(); m_ShipControl.NotDieStateStart(); int index = m_shot.StartCycleLines(bullet, bullets, 12, 10, false, 80, 0.1f); //m_shot.StartMoreLineWithTimeOffsetAndTrace(bullet, bullets, new Vector3(50, 0, 260), 3, 20, 30, 50, 0.1f, 0.5f); //int index = m_shot.StartCycleLinesWithTimeOffsetAndTrace(bullet, bullets, new Vector3(50, 0, 260f), // 38, 10, false, 30, 100, 0.1f, 1.0f); yield return(new WaitForSeconds(shotTime)); m_shot.StopCoroutineWithIndex(index); if (PlayerPrefs.GetInt("NotDie") == 0) { m_ShipControl.NotDieStateEnd(); } }