private void TryAction() { if (Input.GetMouseButtonDown(0)) { if (!popupNote) // 쪽지를 띄우기전 { Check_Do_action(); } else // 쪽지가 화면에 띄워진 이후에는 쪽지가 다시 되돌아갈 작업만 해야함 { if (_pre_note_script.get_corPossible()) { //// - 쪽지 매니저 //notemager._popup = false; //reset_NoteState 함수에 포함 ActionDisappear(); //info 삭제 - 분명 삭제했는데 왜 자꾸 뜬담? popupNote = false; //팝업 해제 _pre_note_script.move_NoteAni(); _pre_note_script = null; } } } }
private void Check_Do_action() { if (hitaction.transform != null) { //추후에 따로 분리할 예정입니다. //if (hitaction.transform.tag == "Action") //compare @ //{ // int Chestnumber = hitaction.transform.parent.GetComponent<Chestaction>().Chest_number; // moveChest[Chestnumber].transform.parent.GetComponent<Chestaction>().Start_action(1); //} if (hitaction.transform.CompareTag("Note")) //compare @ { //if (AniState == false) //{ // ActionDisappear(); //info 삭제 - 분명 삭제했는데 왜 자꾸 뜬담? // hitaction.transform.GetComponent<PageNote>().CheckAddcount(1); // fpCam_Script.enabled = false; // player_script.enabled = false; // Aim.SetActive(false); // DelayPlay(); //} RewardNote_Check noteScript = hitaction.transform.GetComponent <RewardNote_Check>(); if (noteScript.get_corPossible()) { // - 쪽지 이동 스크립트 _pre_note_script = noteScript; // - 쪽지 매니저 notemager._popup = true; // - 쪽지 상태, UI hitaction.transform.GetComponent <PageNote>().CheckAddcount(1); if (note_num_script != null) { note_num_script.SetNoteCount(); } popupNote = true; //팝업 상태 ActionDisappear(); //info 삭제 - 분명 삭제했는데 왜 자꾸 뜬담? fpCam_Script.enabled = false; player_script.SetDeActiveAni(); player_script.enabled = false; Aim.SetActive(false); // - 외곽선, 클릭버튼 해제보다 먼저 해야함 noteScript.move_NoteAni(); // - 외곽선 해제 OutlineController.set_enabled(pre_ol_index, false); pre_ol_index = -1; OutlineController.set_check(false); outline_active = false; // - 클릭버튼 비활성화 actionCaption.SetActive(false); } } //if (hitaction.transform.CompareTag("Door")) //compare @ //ActionController_Ending 스크립트에 있습니다 //{ // notemager.OpenCondition(); //} } }