Beispiel #1
0
    void BulletPoolActive(Vector3 fireVector, BulletType.B_Type type)
    {
        GameObject tempBullet = deactiveList[0];

        deactiveList.RemoveAt(0);
        //타입지정
        tempBullet.GetComponent <BulletType>().BType = type;
        tempBullet.AddComponent <E_Bullet>();
        tempBullet.SetActive(true);
        tempBullet.transform.position = this.transform.position;
        tempBullet.transform.rotation = Quaternion.LookRotation(fireVector);
    }
Beispiel #2
0
    //가운데(샷6)
    void BulletPoolActiveBezierForward(float fireDeg, BulletType.B_Type type)
    {
        float      radDegree  = Mathf.Deg2Rad * fireDeg;
        Vector3    fireVector = new Vector3(Mathf.Cos(radDegree), 0, Mathf.Sin(radDegree));
        GameObject tempBullet = deactiveList[0];

        deactiveList.RemoveAt(0);
        tempBullet.GetComponent <BulletType>().BType = type;
        tempBullet.AddComponent <E_Bullet>();
        tempBullet.SetActive(true);
        tempBullet.transform.position = this.transform.position;
        tempBullet.transform.rotation = Quaternion.LookRotation(fireVector);
    }
Beispiel #3
0
    //베지어곡선생성
    void BulletPoolActiveBezier(float fireDeg, BulletType.B_Type type, bool dirRight)
    {
        GameObject tempBullet = deactiveList[0];

        deactiveList.RemoveAt(0);
        tempBullet.GetComponent <BulletType>().BType = type;
        tempBullet.AddComponent <E_Bullet_Bezier>();
        tempBullet.GetComponent <E_Bullet_Bezier>().dirRight = dirRight;
        tempBullet.SetActive(true);
        tempBullet.transform.position = this.transform.position;
        tempBullet.GetComponent <E_Bullet_Bezier>().spawnerPos = this.transform;
        tempBullet.GetComponent <E_Bullet_Bezier>().fireDegree = fireDeg;
    }