Exemple #1
0
    IEnumerator ShowSkillIEnumator_AC(Transform marisaTF, Transform target)
    {
        for (int i = 0; i < 100; i++)
        {
            GameObject     go     = GameObject.Instantiate(bulletPrefab);
            SpriteRenderer render = go.GetComponent <SpriteRenderer>();
            render.sprite = spriteList[(int)Random.Range(0, spriteList.Count - 0.1f)];
            LockBullet lockBullet = go.GetComponent <LockBullet>();
            lockBullet.target  = target;
            lockBullet.speed   = Random.Range(4, 16);
            lockBullet.m_Type  = BulletBase.BulletTpye.emptyBullet;
            lockBullet.injured = 60;
            lockBullet.HP      = 50;
            if (marisaTF.rotation.eulerAngles.y == 0)
            {
                go.transform.rotation = Quaternion.Euler(0, 0, 180);
                go.transform.position = new Vector3(marisaTF.position.x - 2.0f, marisaTF.position.y);
            }

            else
            {
                go.transform.position = new Vector3(marisaTF.position.x + 2.0f, marisaTF.position.y);
            }
            go.transform.rotation = Quaternion.Euler(0, 0, -15);
            yield return(new WaitForSeconds(0.1f));
        }
    }
Exemple #2
0
    public override void Show(Transform shotPoint, Transform parent, Transform target = null, int sign = 1)
    {
        float angle = -135;

        for (int i = 0; i < 7; i++)
        {
            GameObject go     = GameObject.Instantiate(lockBullet);
            LockBullet bullet = go.GetComponent <LockBullet>();
            bullet.injured = injured;
            bullet.HP      = 0.2f;
            bullet.target  = target;
            go.transform.SetParent(parent, false);
            go.transform.position    = shotPoint.position;
            go.transform.eulerAngles = new Vector3(0, 0, angle);
            angle += 45;
        }
    }