// 间隔一段时间进行线性追踪射击 private IEnumerator ShotForLine() { while (true) { yield return(new WaitForSeconds(1.0f)); int index = m_Shot.StartMoreLineWithTimeOffsetAndTrace(Bullet_Common, Bullets, playerTrasform.position, BaseNumber * 3, 30, -BaseSpeed / 2, BaseSpeed, 1.2f); yield return(new WaitForSeconds(3.0f)); m_Shot.StopCoroutineWithIndex(index); } }
// 第一个技能方法 private IEnumerator StartTriangleAndCulerShot_1(float totalTime) { float time = 0.0f; int index_1 = m_Shot.StartEuler(bullet_Big, bullets, baseNumber * 2, 60, -60, 2.0f); while (true) { int index; index = m_Shot.StartMoreLineWithTimeOffsetAndTrace(bullet_Common, bullets, player_Transform.position, baseNumber * 3, 20, -baseSpeed, baseSpeed, 0.2f); yield return(new WaitForSeconds(1.0f)); m_Shot.StopCoroutineWithIndex(index); time += 1.0f; if (time >= totalTime) { break; } } m_Shot.StopCoroutineWithIndex(index_1); }