Ejemplo n.º 1
0
    private IEnumerator SkillShip_4(GameObject obj, float shotTime)
    {
        BulletShotHelper m_shot        = obj.GetComponent <BulletShotHelper>();
        ShipControl      m_ShipControl = obj.GetComponent <ShipControl>();

        m_ShipControl.NotDieStateStart();
        int index   = m_shot.StartCycleBoom(bullet, bullet, bullets, 12, 12, 100, 60, 0.1f, 0.5f);
        int index_2 = m_shot.StartRotationLines(bullet_other, bullets, 12, 10, 100, 0.1f);

        yield return(new WaitForSeconds(shotTime));

        m_shot.StopCoroutineWithIndex(index);
        m_shot.StopCoroutineWithIndex(index_2);
        if (PlayerPrefs.GetInt("NotDie") == 0)
        {
            m_ShipControl.NotDieStateEnd();
        }
    }
Ejemplo n.º 2
0
    // 第三个技能
    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);
    }