Ejemplo n.º 1
0
    private void End_LampP()
    {
        if (CheckOnL == 8)
        {
            // - 클릭 방지
            actionCtrler2_script.enabled = false; //아이템스크립트에서
            clear_puzzle = true;                  //본스크립트에서

            // 수정. 끝났을때 플레이어의 앞에 툭 떨어지는 것으로 수정
            SoundManger.instance.PlaySound(tinkerBellSound);

            StartCoroutine(StopFallTinker());

            bell_Doll.SetActive(true);
            bell_Doll.transform.position = SetPosition.position;
            bell_Doll.transform.rotation = SetPosition.rotation;

            if (pre_ol_index != -1)
            {
                // - 외곽선 해제
                OutlineController.set_enabled(pre_ol_index, false);
                pre_ol_index = -1;
                OutlineController.set_check(false);
                outline_active = false;

                // - 클릭버튼 해제
                actionCaption.SetActive(false);
            }
            InfoDisappear();
        }
    }
Ejemplo n.º 2
0
    void Update()
    {
        //가리킨 타겟 콜라이드
        if (TargetCollideTouchpoint())
        {
            isPointing = true;
        }
        else
        {
            if (isPointing)
            {
                OutlineController.set_enabled(index, false);
                isPointing = false;
                target     = null;
            }
        }

        //클릭 상태
        if (Input.GetMouseButtonDown(0))
        {
            isSelected = true;
        }
        if (Input.GetMouseButtonUp(0))
        {
            isSelected = false;
        }
    }
Ejemplo n.º 3
0
    private void CheckHit()
    {
        if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hitInfo, range, layerMask))
        {
            if (OutlineController.get_outline_okay())
            {
                return;
            }

            if (hitInfo.transform.CompareTag("Door")) //compare @
            {
                InfoAppear();

                // - 클릭버튼 활성화
                actionCaption.SetActive(true);

                // - 외곽선
                SetOutline setoutlin_script = hitInfo.transform.GetComponent <SetOutline>();
                int        cur_ol_index     = setoutlin_script._index;

                OutlineController.set_check(true);
                outline_active = true;

                if (pre_ol_index == -1)
                {
                    OutlineController.set_enabled(cur_ol_index, true);
                    pre_ol_index = cur_ol_index;
                }
                else
                {
                    OutlineController.set_enabled(pre_ol_index, false);
                    OutlineController.set_enabled(cur_ol_index, true);
                    pre_ol_index = cur_ol_index;
                }
            }
        }
        else
        {
            InfoDisappear();

            if (pre_ol_index != -1)
            {
                //외곽선 해제
                OutlineController.set_enabled(pre_ol_index, false);
                pre_ol_index = -1;
                OutlineController.set_check(false);
                outline_active = false;

                // - 클릭버튼 해제
                actionCaption.SetActive(false);
            }
        }
    }
Ejemplo n.º 4
0
    private void LookAtClock()
    {
        if (popup_anmu)
        {
            return;
        }

        if (Physics.Raycast(mCT.position, mCT.TransformDirection(Vector3.forward), out hitInfo, range, layerMask))
        {
            if (hitInfo.transform.CompareTag("InputButton_CP"))
            {
                DrawOutline();
            }
            else if (hitInfo.transform.CompareTag("EnterButton_CP"))
            {
                DrawOutline();
            }
            else
            {
                if (pre_ol_index != -1)
                {
                    //외곽선 해제
                    OutlineController.set_enabled(pre_ol_index, false);
                    pre_ol_index = -1;
                    OutlineController.set_check(false);
                    outline_active = false;

                    // - 클릭버튼 해제
                    actionCaption.SetActive(false);
                }
            }
        }
        else
        {
            if (pre_ol_index != -1)
            {
                //외곽선 해제
                OutlineController.set_enabled(pre_ol_index, false);
                pre_ol_index = -1;
                OutlineController.set_check(false);
                outline_active = false;

                // - 클릭버튼 해제
                actionCaption.SetActive(false);
            }
        }
    }
Ejemplo n.º 5
0
    private void CanPickUp()
    {
        if (pickupActivated)
        {
            if (hitInfo.transform != null)
            {
                if (hitInfo.transform.CompareTag("Note_CP")) // 1번 : 시계쪽지 순서
                {
                    // - 커서
                    //gameMgr_script.noneCursor();

                    // - 쪽지 상태, UI
                    hitInfo.transform.GetComponent <PageNote>().CheckAddcount(1);
                    if (note_num_script != null)
                    {
                        note_num_script.SetNoteCount();
                    }
                    // - 쪽지 매니저
                    notemager._popup = true;

                    InfoDisappear();

                    // - 상태
                    popupNote = true;

                    // - 모델링교체 (외곽선때문에)
                    clockNote_script.SetActive_Ani(true);
                    clockNote_script.SetActive_Outline(false);

                    // - 외곽선, 클릭버튼 해제보다 먼저 해야함
                    clockNote_script.startAni_Note();
                    Aim.SetActive(false);

                    // - 외곽선 해제
                    OutlineController.set_enabled(pre_ol_index, false);
                    pre_ol_index = -1;
                    OutlineController.set_check(false);
                    outline_active = false;

                    // - 클릭버튼 비활성화
                    actionCaption.SetActive(false);
                }
            }
        }
    }
Ejemplo n.º 6
0
    private void LookAtClock()
    {
        Mouse_ray = camera.ScreenPointToRay(Input.mousePosition);
        if (Physics.Raycast(Mouse_ray, out hitInfo, range, CamObstacle_layerMask))
        {
            //if (OutlineController.get_outline_okay())
            //    return;

            if (hitInfo.transform.CompareTag("SubClock"))
            {
                // - 클릭버튼 활성화
                actionCaption.SetActive(true);

                //외곽선 그리기
                //if (pre_ol_index == -1)
                //{
                //    sub_clock_info = hitInfo.transform.gameObject.GetComponent<SubClockInfo>();

                //    SetOutline setoutlin_script = hitInfo.transform.GetComponent<SetOutline>();
                //    OutlineController.set_enabled(setoutlin_script._index, true);
                //    OutlineController.set_check(true);  //
                //    outline_active = true;              //
                //    pre_ol_index = setoutlin_script._index;
                //}

                sub_clock_info = hitInfo.transform.gameObject.GetComponent <SubClockInfo>();

                SetOutline setoutlin_script = hitInfo.transform.GetComponent <SetOutline>();
                int        cur_index        = setoutlin_script._index;

                OutlineController.set_check(true);
                outline_active = true;

                if (pre_ol_index == -1)
                {
                    OutlineController.set_enabled(cur_index, true);
                    pre_ol_index = cur_index;
                }
                else
                {
                    OutlineController.set_enabled(pre_ol_index, false);
                    OutlineController.set_enabled(cur_index, true);
                    pre_ol_index = cur_index;
                }
            }
            else
            {
                if (pre_ol_index != -1)
                {
                    // - 클릭버튼 해제
                    actionCaption.SetActive(false);

                    //외곽선 해제
                    OutlineController.set_enabled(pre_ol_index, false);
                    pre_ol_index = -1;
                    OutlineController.set_check(false);
                    outline_active = false;
                }
            }
        }
        else
        {
            if (pre_ol_index != -1)
            {
                // - 클릭버튼 해제
                actionCaption.SetActive(false);

                //외곽선 해제
                OutlineController.set_enabled(pre_ol_index, false);
                pre_ol_index = -1;
                OutlineController.set_check(false);
                outline_active = false;
            }
        }
    }
Ejemplo n.º 7
0
    private void CanPickUp()
    {
        if (!outline_active) // 습득과 관련된 아이템은 외곽선과 상관 있다
        {
            return;
        }

        if (pickupActivated)
        {
            if (hitInfo.transform != null)
            {
                if (hitInfo.transform.CompareTag("Item"))
                {
                    if (theInventory.AcquireItem(hitInfo.transform.GetComponent <ItemPickUp>().item))
                    {
                        //아이템 입수 사운드
                        SoundManger.instance.PlaySound(itemgainsound);


                        // - 아이템 습득
                        InfoDisappear();                               //info 삭제

                        hitInfo.transform.gameObject.SetActive(false); //아이템 비활성화
                        OutlineController.set_enabled(pre_ol_index, false);
                        OutlineController.set_check(false);
                        outline_active = false;

                        // - 클릭버튼 비활성화
                        actionCaption.SetActive(false);

                        PickUp_state = true; // 습득한 상태로 변경 -> 이후 Check_use_Item에서 location_script의 상태 업데이트하기 위해서

                        // - 장식장 클릭 (장식장에서 인형을 뺐을때)
                        if (hitInfo2.transform != null) //null @
                        {
                            if (hitInfo2.transform.CompareTag("Location"))
                            {
                                DisplayLocation location_script = hitInfo2.transform.GetComponent <DisplayLocation>(); // @
                                int             display_index   = location_script.location_Num;

                                displayManager_script2.reset_DisplayArry(display_index);

                                // - 활성화 상태 / 놓여진 상태임을 animation 매니저에 저장
                                dollAniManager_script.set_dollAcitveState(display_index, false);
                            }
                        }
                    }
                }
            }
        }
    }
Ejemplo n.º 8
0
    private void CheckHit()
    {
        if (!isPopup)
        {
            if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hitInfo, range, layerMask))
            {
                if (OutlineController.get_outline_okay())
                {
                    return;
                }

                if (hitInfo.transform.CompareTag("Book_EB")) //compare @
                {
                    InfoAppear();

                    // - 클릭버튼 활성화
                    actionCaption.SetActive(true);

                    // - 외곽선
                    SetOutline setoutlin_script = hitInfo.transform.GetComponent <SetOutline>();
                    int        cur_ol_index     = setoutlin_script._index;

                    OutlineController.set_check(true);
                    outline_active = true;

                    if (pre_ol_index == -1)
                    {
                        OutlineController.set_enabled(cur_ol_index, true);
                        pre_ol_index = cur_ol_index;
                    }
                    else
                    {
                        OutlineController.set_enabled(pre_ol_index, false);
                        OutlineController.set_enabled(cur_ol_index, true);
                        pre_ol_index = cur_ol_index;
                    }
                }
            }
            else
            {
                InfoDisappear();

                if (pre_ol_index != -1)
                {
                    //외곽선 해제
                    OutlineController.set_enabled(pre_ol_index, false);
                    pre_ol_index = -1;
                    OutlineController.set_check(false);
                    outline_active = false;

                    // - 클릭버튼 해제
                    actionCaption.SetActive(false);
                }
            }
        }
        else
        {
            Vector3 worldPosition = Input.mousePosition;

            if (worldPosition.x >= Screen.width / 2)
            {
                possibleBookFlip = true;
            }
            else
            {
                possibleBookFlip = false;
            }

            Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

            if (Physics.Raycast(ray.origin, ray.direction, out hitInfo, range, layerMask))
            {
                if (isLastPage && !flipOver)
                {
                    if (OutlineController.get_outline_okay())
                    {
                        return;
                    }

                    if (hitInfo.transform.CompareTag("Key_EB")) //compare @
                    {
                        getKey = true;
                        InfoAppear();

                        // - 클릭버튼 활성화
                        actionCaption.SetActive(true);

                        // - 외곽선
                        ItemPickUp pieceItem_script = hitInfo.transform.GetComponent <ItemPickUp>();
                        int        cur_ol_index     = pieceItem_script.outlineIndex;

                        OutlineController.set_check(true);
                        outline_active = true;

                        if (pre_ol_index == -1)
                        {
                            OutlineController.set_enabled(cur_ol_index, true);
                            pre_ol_index = cur_ol_index;
                        }
                        else
                        {
                            OutlineController.set_enabled(pre_ol_index, false);
                            OutlineController.set_enabled(cur_ol_index, true);
                            pre_ol_index = cur_ol_index;
                        }
                    }
                    else // 여기 안거침
                    {
                        getKey = false;
                    }
                }
                else
                {
                    getKey = false;
                }
            }
            else
            {
                getKey = false;

                InfoDisappear();

                if (pre_ol_index != -1)
                {
                    //외곽선 해제
                    OutlineController.set_enabled(pre_ol_index, false);
                    pre_ol_index = -1;
                    OutlineController.set_check(false);
                    outline_active = false;

                    // - 클릭버튼 해제
                    actionCaption.SetActive(false);
                }
            }
        }
    }
Ejemplo n.º 9
0
    public void FindVisibleTargets()
    {
        if (!_check)
        {
            return;
        }

        //360도 시야거리 내에 존재하는 모든 콜라이더 받아오기
        Collider[] targets = Physics.OverlapSphere(_transform.position, ViewDistance, TargetMask);


        //- 콜라이더 아이템인거로 추가
        if (targets.Length > 0)
        {
            for (int i = 0; i < targets.Length; i++)
            {
                Transform target = targets[i].transform;

                //탱크로부터 타겟까지의 단위벡터
                Vector3 dirToTarget = (target.position - _transform.position).normalized;

                //내적값이 시야각/2의 Cos값보다 크면 시야에 들어온 것이다.
                if (Vector3.Dot(_transform.forward, dirToTarget) > Mathf.Cos((ViewAngle / 2) * Mathf.Deg2Rad)) //시야각 범위 안인지
                {
                    float distToTarget = Vector3.Distance(_transform.position, target.position);               //플레이어 기준으로 검사타겟 사이의 거리
                    //Debug.DrawLine(_transform.position, target.position, Color.red);

                    if (_target_obj == null)
                    {
                        if (distToTarget < minDist) //타겟 오브젝트가 없을때, 최소 거리보다 가까울 경우
                        {
                            FindObstacle(dirToTarget, distToTarget, target, targets[i].gameObject);
                        }
                    }
                    else
                    {
                        float distTo_curTarget = Vector3.Distance(_transform.position, _target_obj.transform.position); //플레이어 기준, 지정한 타겟 사이의 거리 재설정

                        if (distToTarget < distTo_curTarget)                                                            //타겟 오브젝트가 있을때, 현재 타겟의 거리를 업데이트, 그리고 그것을 비교함
                        {
                            FindObstacle(dirToTarget, distToTarget, target, targets[i].gameObject);
                        }
                    }
                }
                else
                {
                    ItemPickUp pieceItem_script = targets[i].transform.GetComponent <ItemPickUp>();
                    if (pieceItem_script.outlineIndex == pre_ol_index)
                    {
                        _target_obj = null;
                        OutlineController.set_enabled(pre_ol_index, false);
                        //pre_ol_index = 0; //***초기화
                    }
                }
            }
        }
        else
        {
            _target_obj = null;
            minDist     = 9f;

            //퍼픕릭 타겟이 널이 아니면 아웃라인업애기
            OutlineController.set_enabled(pre_ol_index, false);

            _check = false;
        }
    }
Ejemplo n.º 10
0
    private void CanPickUp()
    {
        if (pickupActivated)
        {
            if (hitInfo.transform != null)
            {
                if (hitInfo.transform.CompareTag("Item"))
                {
                    int hit_itemCode = hitInfo.transform.GetComponent <ItemPickUp>().item.itemCode;

                    // - 습득
                    if (hit_itemCode == 110) //퍼즐조각 일때
                    {
                        //Debug.Log(hitInfo.transform.GetComponent<ItemPickUp>().item.itemName + "획득했습니다");
                        Item hit_item = hitInfo.transform.GetComponent <ItemPickUp>().item;

                        //퍼즐조각 입수 사운드
                        SoundManger.instance.PlaySound(itemgainsound);


                        // - 퍼즐조각 수집 개수 증가
                        BlockCount++;
                        if (BlockCount == 1)
                        {
                            //guideController_script.change_sprite(1);
                            //guide_script.InStartFadeAnim();
                        }
                        else
                        {
                            guideController_script.change_sprite(3);
                            guide_script.InStartFadeAnim();
                        }

                        // - 퍼즐조각 습득
                        theInventory.AcquireItem(hit_item);

                        // - 외곽선 없애기
                        hitInfo.transform.gameObject.SetActive(false);
                        OutlineController.set_enabled(pre_ol_index, false);
                        //OutlineController.set_destroy(pre_ol_index); //필요없을수도

                        // - info 사라짐
                        InfoDisappear();
                    }

                    // - 사용
                    else if (hit_itemCode == 111) //조각 배치
                    {
                        if (theInventory.IsVoid_Slot(selectSlot_script.get_index()))
                        {
                            //// - 텍스트 출력
                            //puzzleText.text = "퍼즐조각이 필요하다";
                            ////페이드아웃
                            //text_script.InStartFadeAnim();

                            guideController_script.change_sprite(2);
                            guide_script.InStartFadeAnim();

                            return;
                        }

                        int select_itemCode = theInventory.get_ItemCode(selectSlot_script.get_index());

                        // - 퍼즐 배치
                        if (select_itemCode == 110)
                        {
                            //퍼즐조각 배치 사운드
                            SoundManger.instance.PlaySound(itemusesound);

                            //// - 텍스트 출력
                            //puzzleText.text = "퍼즐조각을 배치했다";
                            ////페이드아웃
                            //text_script.InStartFadeAnim();

                            guideController_script.change_sprite(4);
                            guide_script.InStartFadeAnim();

                            UseCount++;

                            // - 사용
                            Item selectItem = theInventory.get_ItemInfo(selectSlot_script.get_index());
                            theInventory.RemoveSlot(selectItem);
                            if (UseCount == 1)
                            {
                            }
                            else if (UseCount >= 5)
                            {
                                // - 퍼즐조각을 다 모았을때, 퍼즐 클릭가능한 상태가 된다
                                PuzzleOn = true;

                                // - info

                                // - 외곽선 , 빈퍼즐블럭 비활성화
                                hitInfo.transform.gameObject.SetActive(false);
                                OutlineController.set_enabled(pre_ol_index, false);
                                puzzleKey.gameObject.SetActive(true);
                            }
                        }
                        else
                        {
                            //// - 텍스트 출력
                            //puzzleText.text = "퍼즐조각이 필요하다";
                            ////페이드아웃
                            //text_script.InStartFadeAnim();

                            guideController_script.change_sprite(2);
                            guide_script.InStartFadeAnim();
                        }
                    }
                    else if (hit_itemCode == 112) //퍼즐 완
                    {
                        // - 카메라 이동
                        ChangeCam_script.change_Camera(1);

                        // - 스크립트 on
                        CarPuzzle_script.enabled = true;

                        // - info 없애기
                        InfoDisappear();
                        //text_script.stop_coroutine();
                        guide_script.stop_coroutine();
                    }
                    //if (hit_itemCode == 113) //상자 일때
                    //{
                    //    // - 콜라이더 비활성화
                    //    hitInfo.collider.enabled = false;

                    //    // - 외곽선 없애기
                    //    //hitInfo.transform.gameObject.SetActive(false);
                    //    OutlineController.set_enabled(pre_ol_index, false);

                    //    // - info 없애기
                    //    InfoDisappear();

                    //    // - 상자 애니메이션
                    //    boxOpen_script.set_aniBool();
                    //}

                    return;
                }
            }

            if (hitInfo.transform.CompareTag("Note_BP"))
            {
                // - 쪽지 상태
                hitInfo.transform.GetComponent <PageNote>().CheckAddcount(1);
                note_num_script.SetNoteCount();

                // - 팝업 상태
                popupNote = true;

                viewNote_script.StartAni_Note();

                InfoDisappear();
                OutlineController.set_enabled(pre_ol_index, false);

                return;
            }

            if (hitInfo.transform.CompareTag("ObjAni"))
            {
                //애니메이션 출력 전 이동
                InteractionMoving interactMoving_script = hitInfo.transform.GetComponent <InteractionMoving>();
                interactMoving_script.StartToMove();

                InfoDisappear();

                return;
            }
        }
    }
Ejemplo n.º 11
0
    private void LookAtFrame()
    {
        Mouse_ray = camera.ScreenPointToRay(Input.mousePosition);
        if (Physics.Raycast(Mouse_ray, out hitInfo, range, FramelayerMask))
        {
            if (OutlineController.get_outline_okay())
            {
                return;
            }

            if (hitInfo.transform.CompareTag("Frame"))
            {
                //// - 장애물 검사하기
                //coverCheck = obstacleReader_script.LookAtFrame(CamObstacle_layerMask);
                //if (coverCheck)
                //    return;

                // - 클릭버튼 활성화
                actionCaption.SetActive(true);

                // - 외곽선 그리기
                if (pre_ol_index == -1)
                {
                    SetOutline setoutlin_script = hitInfo.transform.GetComponent <SetOutline>();
                    OutlineController.set_check(true);
                    OutlineController.set_enabled(setoutlin_script._index, true);
                    pre_ol_index   = setoutlin_script._index;
                    outline_active = true;
                }
            }
            else
            {
                if (pre_ol_index != -1)
                {
                    // - 외곽선 해제
                    OutlineController.set_enabled(pre_ol_index, false);
                    pre_ol_index = -1;
                    OutlineController.set_check(false);
                    outline_active = false;

                    // - 클릭버튼 해제
                    actionCaption.SetActive(false);
                }
            }
        }
        else
        {
            if (pre_ol_index != -1)
            {
                // - 외곽선 해제
                OutlineController.set_enabled(pre_ol_index, false);
                pre_ol_index = -1;
                OutlineController.set_check(false);
                outline_active = false;

                // - 클릭버튼 해제
                actionCaption.SetActive(false);

                // - 장애물 검사하기
                //coverCheck = obstacleReader_script.LookAtFrame(CamObstacle_layerMask);
            }
        }
    }
Ejemplo n.º 12
0
    private void CanPickUp()
    {
        if (!outline_active) // 습득과 관련된 아이템은 외곽선과 상관 있다
        {
            return;
        }

        if (pickupActivated)
        {
            if (hitInfo.transform != null)
            {
                if (hitInfo.transform.CompareTag("Item"))
                {
                    if (theInventory.AcquireItem(hitInfo.transform.GetComponent <ItemPickUp>().item))
                    {
                        // 오류고치기
                        //// +
                        //DisplayLocation location_script = hitInfo2.transform.GetComponent<DisplayLocation>(); // @
                        //int display_index = location_script.location_Num;

                        //// +
                        //ItemPickUp pieceItem_script = hitInfo.transform.GetComponent<ItemPickUp>();
                        //pieceItem_script.get_layoutIndex();

                        //// +
                        ////if (!location_script.tryToPut_doll())
                        ////    return;
                        ////클릭한 장식장 위치와 아이템의 놓여진 위치가 동일하면


                        //아이템 입수 사운드
                        SoundManger.instance.PlaySound(itemgainsound);

                        // - 아이템 습득
                        hitInfo.transform.gameObject.SetActive(false); //아이템 비활성화
                        //아이템에 달려있는 리지드 바디 비활성화
                        OutlineController.set_enabled(pre_ol_index, false);
                        OutlineController.set_check(false);
                        outline_active = false;

                        InfoDisappear();     //info 삭제

                        PickUp_state = true; // 습득한 상태로 변경 -> 이후 Check_use_Item에서 location_script의 상태 업데이트하기 위해서

                        // - 장식장 클릭 (인형이 놓여져있음)
                        if (hitInfo2.transform != null) //null @
                        {
                            if (hitInfo2.transform.CompareTag("Location"))
                            {
                                // - 습득당시, 장식장 위치를 정확하게 검사하기 위에서 조금 앞에 코드 놔둠
                                DisplayLocation location_script = hitInfo2.transform.GetComponent <DisplayLocation>(); // @
                                int             display_index   = location_script.location_Num;

                                // #
                                displayManager_script.reset_DisplayArry(display_index);
                            }
                        }
                    }
                    else if (hitInfo.transform.GetComponent <ItemPickUp>().item.itemName == "FlashlightItem")
                    {
                        //Destroy(hitInfo.transform.gameObject); //아이템 삭제, 나중엔 코루틴으로 #

                        // - 손전등(아이템) 비활성화
                        hitInfo.transform.gameObject.SetActive(false);
                        OutlineController.set_enabled(pre_ol_index, false);

                        // - 손전등 기능 on
                        FlashlightItem.SetActive(true);
                        flash_script.enabled = true;
                    }
                }
                else
                {
                }
            }
        }
    }
Ejemplo n.º 13
0
    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();
            //}
        }
    }
Ejemplo n.º 14
0
    public void OnTriggerStay(Collider other)
    {
        if (other.transform.CompareTag("Player"))
        {
            if (_2stage_clear)
            {
                return;
            }

            if (notemager._popup == true) //쪽지 팝업 체크
            {
                return;
            }

            if (textstate)
            {
                if (LookAtDoor())
                {
                    //GuidText();

                    // - 외곽선 그리기
                    if (pre_ol_index == -1)
                    {
                        SetOutline setoutlin_script = hitInfo.transform.GetComponent <SetOutline>();
                        OutlineController.set_check(true);
                        OutlineController.set_enabled(setoutlin_script._index, true);
                        pre_ol_index   = setoutlin_script._index;
                        outline_active = true;

                        // - 클릭버튼 활성화
                        actionCaption.SetActive(true);
                    }
                }
                else
                {
                    if (pre_ol_index != -1)
                    {
                        // - 외곽선 해제
                        OutlineController.set_enabled(pre_ol_index, false);
                        pre_ol_index = -1;
                        OutlineController.set_check(false);
                        outline_active = false;

                        // - 클릭버튼 해제
                        actionCaption.SetActive(false);
                    }
                }
            }
            else
            {
                //NotText();

                if (pre_ol_index != -1)
                {
                    // - 외곽선 해제
                    OutlineController.set_enabled(pre_ol_index, false);
                    pre_ol_index = -1;
                    OutlineController.set_check(false);
                    outline_active = false;

                    // - 클릭버튼 해제
                    actionCaption.SetActive(false);
                }
            }

            if (Input.GetMouseButtonDown(0))
            {
                if (LookAtDoor())
                {
                    ChangeCam_script.change_Camera(1);

                    //NotText();

                    textstate = false;
                }
            }
        }
    }