Exemplo n.º 1
0
    public void skill_mass_shot()
    {
        for (int i = 0; i < skill_count; i++)
        {
            GameObject ammo = RocketPool[RocketPoolLimit - i - 1];

            ammo.transform.position = transform.position;
            ammo.transform.rotation = Quaternion.Euler(0f, 0f, (float)(-15 + i * 30 / skill_count));
            ammo.SetActive(true);
        }
        Shot_source.PlayOneShot(rocket_sound);
    }
Exemplo n.º 2
0
    protected IEnumerator Shoot_coroutine()
    {
        int left = -1;

        while (true)
        {
            int  i     = 0;
            bool shoot = true;
            while (shoot & i < AmmoPoolLimit & gameObject.layer == 12)
            {
                GameObject ammo = AmmoPool[i];
                if (ammo.activeSelf == false)
                {
                    if (left > 0)
                    {
                        ammo.transform.position = pos_fire1.transform.position;
                        left = -left;
                    }
                    else
                    {
                        ammo.transform.position = pos_fire2.transform.position;

                        left = -left;
                    }
                    shoot = false;
                    ammo.transform.rotation = transform.rotation;
                    ammo.SetActive(true);
                    if (GameManager.Using_sound)
                    {
                        Shot_source.PlayOneShot(shoot_sound);
                    }
                }
                else
                {
                    i++;
                }
            }
            yield return(new WaitForSeconds((float)GameManager.fire_rate));
        }
    }