Page 365 - MDP2022-3
P. 365

}
                                    collision.gameObject.SetActive(false);


                            }

                    }
                    void  addFollower()                             //  플레이어  보조개체  설정
                    {
                            if  (power  ==  4)
                                    follower[0].SetActive(true);

                            else  if  (power  ==  5)
                                    follower[1].SetActive(true);
                            else  if  (power  ==  6)
                                    follower[2].SetActive(true);


                    }

                    void  offBoom()                                 //폭발처리후  비활성화
                    {
                            onBoom();
                            BoomEffect.SetActive(false);

                            boomTime  =  false;
                    }
                    void  onBoom()          //폭탄  활성화
                    {
                            GameObject[]  enemiesA  =  objectManager.Getpool("enemyA");
                            GameObject[]  enemiesB  =  objectManager.Getpool("enemyB");

                            GameObject[]  enemiesC  =  objectManager.Getpool("enemyC");


                            for  (int  index  =  0;  index  <  enemiesA.Length;  index++)
                            {

                                    if  (enemiesA[index].activeSelf)
                                    {
                                            Enemy  enemyLogic  =  enemiesA[index].GetComponent<Enemy>();
                                    enemyLogic.onHit(50);
                                    }
                            }


                            for  (int  index  =  0;  index  <  enemiesB.Length;  index++)
                            {
                                    if  (enemiesB[index].activeSelf)

                                    {
                                    Enemy  enemyLogic  =  enemiesB[index].GetComponent<Enemy>();
   360   361   362   363   364   365   366   367   368   369   370