Page 372 - MDP2022-3
P. 372

health  =  15;
                                            break;
                                    case  "C":
                                            health  =  50;

                                            break;
                                    case  "Z":
                                            health  =  3000;
                                            Invoke("stop",  2);
                                            break;

                            }
                    }
                    void  stop()                                                    //보스설정
                    {
                            if  (!gameObject.activeSelf)
                                    return;

                            Rigidbody2D  rigid  =  GetComponent<Rigidbody2D>();
                            rigid.velocity  =  Vector2.zero;
                            Invoke("think",2);
                    }

                    void  think()                                                   //보스패턴설정
                    {






                                    if  (patternIndex  <  3&¤tPatternCount!=0)

                            {

                                    patternIndex  +=  1;



                            }
                            else
                            {
                                    patternIndex  =  0;
                            }

                            currentPatternCount  =  0;
                            Debug.Log(patternIndex);
                            switch  (patternIndex)
                            {

                                    case  0:
                                            fire1st();
   367   368   369   370   371   372   373   374   375   376   377