Page 403 - MDP2022-3
P. 403

2)캐릭터  애니메이션



              (1)코드










            vec  =  new  Vector3(player.position.x,  1,  player.position.z);
                            if(!stop  &&  !GameManager.instance.start)
                            {
                                    transform.LookAt(vec);
                                    vec2  =  way.position;
                            }
                            else  if(!stop  &&  GameManager.instance.start)
                            {
                                    Debug.Log("aaa");
                                    anim.SetBool("walk",  true);
                                    nav.SetDestination(vec2);
                            }
                            else  if(stop  &&  GameManager.instance.start)
                            {
                                    if  (look)
                                    {
                                            if  (GameManager.instance.socket)
                                            {
                                                    if  (!sound2)
                                                    {
                                                            audio.Play();
                                                            sound2  =  true;
                                                    }


                                                    if  (time2  >  0)
                                                    {
                                                            text.text  =  "뒤로  살짝  물러나";
                                                            time2  -=  Time.deltaTime;
                                                            transform.rotation  =  Quaternion.Euler(0,  y,  0);
                                                    }
                                                    else
                                                    {
                                                            backGround.SetActive(false);
                                                            GameManager.instance.magic  =  true;
                                                    }
   398   399   400   401   402   403   404   405   406   407   408