Page 380 - MDP2022-3
P. 380

enemy.transform.Rotate(Vector3.forward  *  60);


                            }
                            else
                            {
                                    rigid.velocity  =  new  Vector2(0,  enemyLogic.speed  *  (-1));
                            }
                            //리스폰  인덱스  증가
                            spawnIndex++;
                            if  (spawnIndex  ==  spawnList.Count)
                            {
                                    spawnEnd  =  true;
                                    return;
                            }
                            //다음  리스폰  딜레이
                            nextSpawnDelay  =  spawnList[spawnIndex].delay;




                    }
                    public  void  RespawnPlayer()
                    {
                            Invoke("RespawnPlayerExe",  2);
                    }
                    public  void  RespawnPlayerExe()
                    {
                            Player  playerlogic  =  Player.GetComponent<Player>();
                            Player.transform.position  =  new  Vector3(0,  -4,  0);
                            Player.SetActive(true);
                            playerlogic.player  =  true;
                            playerlogic.isHit  =  true        ;

                    }
                    public  void  UpdateLifeIcon(int  life)
                    {
                            for  (int  index  =  0;  index  <  lifeImage.Length;  index++)
                            {
                                    lifeImage[index].color  =  new  Color(1,  1,  1,  0);
                            }
                            for  (int  index  =  0;  index  <  life;  index++)
                            {
                                    lifeImage[index].color  =  new  Color(1,  1,  1,  1);
                            }
                    }
                    public  void  UpdateBoomIcon(int  boom)
                    {
                            for  (int  index  =  0;  index  <  BoomImage.Length;  index++)
                            {
   375   376   377   378   379   380   381   382   383   384   385