Page 362 - MDP2022-3
P. 362

rigidRR.AddForce(Vector2.up  *  10,  ForceMode2D.Impulse);
                                            rigidCC.AddForce(Vector2.up  *  10,  ForceMode2D.Impulse);
                                            curshortDelay  =  0;
                                            break;

                            }


                    }
                    public  void  JoyPannel(int  type)                      //조이판넬  설정

                    {
                            for(int  i  =  0;  i  <  9;  i++)
                            {
                                    joyControl[i]  =  i  ==  type;
                            }
                    }



                    public  void  JoyDown()
                    {
                            isControl  =  true;

                    }
                    public  void  JoyUp()
                    {
                            isControl  =  false;
                    }
                      void  Move()                                                  //플레이어  움직이기

                    {
                            float  h  =  Input.GetAxisRaw("Horizontal");
                            float  v  =  Input.GetAxisRaw("Vertical");



                            if  (joyControl[0])  {  h  =  -1;  v  =    1;  }
                            if  (joyControl[1])  {  h  =    0;  v  =    1;  }
                            if  (joyControl[2])  {  h  =    1;  v  =    1;  }
                            if  (joyControl[3])  {  h  =  -1;  v  =    0;  }
                            if  (joyControl[4])  {  h  =    0;  v  =    0;  }
                            if  (joyControl[5])  {  h  =    1;  v  =    0;  }

                            if  (joyControl[6])  {  h  =  -1;  v  =  -1;  }
                            if  (joyControl[7])  {  h  =    0;  v  =  -1;  }
                            if  (joyControl[8])  {  h  =    1;  v  =  -1;  }



                            if  ((isTouchRight  &&  h  ==  1)  ||  (isTouchLeft  &&  h  ==  -1)||!isControl)
                                    h  =  0;
   357   358   359   360   361   362   363   364   365   366   367