Beispiel #1
0
    //緑米弾4発つなげてうつ
    private void Shoot_Connect_Green_Bullet(float speed, float angle)
    {
        List <GameObject> bullet_List = new List <GameObject>();

        _shoot.Set_Bullet_Pool(pool_Manager.Get_Pool(green_Rice_Bullet), null);

        for (int i = 0; i < 4; i++)
        {
            GameObject b = _shoot.Turn_Shoot_Bullet(speed - i * 5, angle, 7.0f);
            bullet_List.Add(b);
        }
        //減速
        _bullet_Acc.Accelerat_Bullet(bullet_List, 0.97f, 0.3f);
    }
    private IEnumerator Shoot_Bullet()
    {
        while (true)
        {
            _gravitate_Player.enabled = true;
            yield return(new WaitForSeconds(1.0f));

            //予備動作
            StartCoroutine("Blink");
            _gravitate_Player.enabled             = false;
            GetComponent <Rigidbody2D>().velocity = new Vector2(0, 0);

            yield return(new WaitForSeconds(1.2f));

            //ショット
            _shoot.Set_Bullet_Pool(bullet_Pool, null);
            _shoot.Odd_Num_Shoot(1, 0, 50f, 10);
            UsualSoundManager.Instance.Play_Shoot_Sound();

            yield return(new WaitForSeconds(0.8f));

            _gravitate_Player.enabled = true;

            yield return(new WaitForSeconds(4.0f));
        }
    }
Beispiel #3
0
    private IEnumerator Shoot_Cor()
    {
        ShootFunction _shoot = GetComponent <ShootFunction>();
        ObjectPool    pool   = ObjectPoolManager.Instance.Get_Pool(bullet);

        _shoot.Set_Bullet_Pool(pool, null);
        while (true)
        {
            yield return(new WaitForSeconds(1.5f));

            if (GetComponent <Renderer>().isVisible)
            {
                UsualSoundManager.Instance.Play_Shoot_Sound();
                _shoot.Diffusion_Bullet(8, 60f, 0, 10f);
                _shoot.Diffusion_Bullet(8, 55f, 4f, 10f);
                _shoot.Diffusion_Bullet(8, 55f, -4f, 10f);
            }

            yield return(new WaitForSeconds(2.7f));
        }
    }