예제 #1
0
        // Use this for initialization
        void Start()
        {
            player = GameObject.Find("Player");
            GameObject An;
            GameObject Sa;

            AnQueue    = new Queue();
            SaQueue    = new Queue();
            startShoot = true;
            for (int i = 0; i < EmotionNum; i++)
            {
                An = Instantiate(AngerUp, Vector2.zero, Quaternion.identity) as GameObject;
                //An.transform.parent = this.gameObject.transform;
                An.GetComponent <EmotionBullet>().m_EmotionTurret = this.gameObject;
                AnQueue.Enqueue(An);
                An.SetActive(false);

                Sa = Instantiate(SadUp, Vector2.zero, Quaternion.identity) as GameObject;
                //Sa.transform.parent = this.gameObject.transform;
                Sa.GetComponent <EmotionBullet>().m_EmotionTurret = this.gameObject;
                SaQueue.Enqueue(Sa);
                Sa.SetActive(false);

                Debug.Log(AnQueue.Count);
            }
        }