コード例 #1
0
    private void InitiateBulletShot()
    {
        for (int i = 0; i < EnemyBullet.Length; i++)
        {
            GameObject   bullet   = Instantiate(EnemyBullet[i]);
            AngleForward bulletaf = bullet.GetComponent <AngleForward>();

            if (bulletaf != null)
            {
                bulletaf.setPos(gameObject.transform.position);
                bulletaf.setRadian(angles[i % angles.Length]);
                bulletaf.setSpeed(10f);
            }
        }
    }
コード例 #2
0
    private void initiateBulletShot()
    {
        for (int i = 0; i < a.Length; i++)
        {
            GameObject   bullet   = Instantiate(a[i], shotpoint.position, transform.rotation);
            AngleForward bulletaf = bullet.GetComponent <AngleForward>();

            if (bulletaf != null)
            {
                bulletaf.setPos(shotpoint.position);
                bulletaf.setRadian(angles[i % angles.Length]);
                bulletaf.setSpeed(10f);
            }
        }
    }
コード例 #3
0
    void ExplodeToThree()
    {
        if (EnemyBullet)
        {
            for (int i = 0; i < EnemyBulletEx.Length; i++)
            {
                GameObject bulletEx = Instantiate(EnemyBulletEx[i]);

                bulletEx.transform.position = transform.position;

                AngleForward bulletaf = bulletEx.GetComponent <AngleForward>();

                if (bulletaf != null)
                {
                    bulletaf.setPos(bullet.transform.position);
                    bulletaf.setRadian(angles[i % angles.Length]);
                    bulletaf.setSpeed(10f);
                }
            }
            Destroy(bullet);
        }
    }