void Start() { animator = GetComponent <Animator>(); CamMove_Script = Camera.main.GetComponent <FirstPersonCamera>(); Player_script = GameObject.FindObjectOfType <Player_HJ>(); clockNote_script = GameObject.FindObjectOfType <FlodNote>(); clockNoteCtrler_script = GameObject.FindObjectOfType <ActionController_TestNote>(); }
IEnumerator MoveNote_End() { stateC = true; //animator.SetBool("IsUnfolding", false); animator.SetFloat("speed", -2f); animator.Play(AniName_unfold, 0, 0.4f); cAni = StartCoroutine(UnfoldAni_End()); // - 스크립트 회복 Player_script.enabled = true; CamMove_Script.enabled = true; if (popup) // start 지점으로 갈떄 { while (true) { yield return(new WaitForSeconds(0.01f)); // - 이동 float step_m = moveSpeed_return * speedFactor * Time.deltaTime; transform.position = Vector3.MoveTowards(transform.position, startTrans.position, step_m); // - 회전 float step_r = rotSpeed_return * Time.deltaTime; transform.rotation = Quaternion.RotateTowards(transform.rotation, startTrans.rotation, step_r); if (Vector3.Distance(transform.position, startTrans.position) < 0.1f) { if (Vector3.Angle(transform.forward, startTrans.forward) < 1f) { break; } } } popup = false; Cursor.lockState = CursorLockMode.Locked; //커서 고정 } // - { clockNoteCtrler_script = GameObject.FindObjectOfType <ActionController_TestNote>(); if (clockNoteCtrler_script != null) //if (clockNoteCtrler_script.activeSelf == true) //활성화 상태이면 { clockNoteCtrler_script.reset_NoteState(); } } stateC = false; }