示例#1
0
    private void DrawOutline()
    {
        // - 클릭버튼 활성화
        actionCaption.SetActive(true);

        // - 외곽선 그리기
        SetOutline setoutlin_script = hitInfo.transform.GetComponent <SetOutline>();

        if (setoutlin_script._index <= 5 && setoutlin_script._index != 0) //시계퍼즐은 조건(범위에들어와야함)이 있기때문에 우선권을 가진다
        {
            OutlineController.set_check(true);
            outline_active = true;

            if (pre_ol_index == -1)
            {
                OutlineController.set_enabled(setoutlin_script._index, true);
                pre_ol_index = setoutlin_script._index;
            }
            else
            {
                OutlineController.set_enabled(pre_ol_index, false);
                OutlineController.set_enabled(setoutlin_script._index, true);
                pre_ol_index = setoutlin_script._index;
            }
        }
    }
    private void LookAtDrawer()
    {
        if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hitaction, range, layerMask))
        {
            if (hitaction.transform.CompareTag("Drawer")) //compare @
            {
                // - 외곽선
                SetOutline setoutlin_script = hitaction.transform.GetComponent <SetOutline>();
                int        cur_ol_index     = setoutlin_script._index;

                if (pre_ol_index == cur_ol_index) // 서랍-서랍 사이의 외곽선 보정
                {
                    if (OutlineController.get_outline_okay())
                    {
                        return;
                    }
                }

                ActionAppear();

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


                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
        {
            ActionDisappear();

            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);
            }
        }
    }
示例#3
0
    private void CheckNote()
    {
        if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hitInfo, range, layerMask))
        {
            if (hitInfo.transform.CompareTag("Note_CP"))
            {
                if (OutlineController.get_outline_okay())
                {
                    return;
                }

                // - info 띄우기
                ItemInfoAppear();

                // - 클릭버튼 활성화
                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);
            }
        }
    }
示例#4
0
    // - 장식장 인형 위치의 콜라이더 확인
    private void Check_Location()
    {
        if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hitInfo2, range, layerMask_dlsplay))
        {
            if (!dollAniManager_script.ClickButton()) // 애니메이션이 끝나고 인형배치할 수 있는 상태가 되어야함
            {
                layActivated = false;
                return;
            }

            layActivated = true;

            if (hitInfo2.transform.CompareTag("Location"))
            {
                //hitInfo2는 장식장 위치
            }
            else if (hitInfo2.transform.CompareTag("Enter"))
            {
                if (OutlineController.get_outline_okay())
                {
                    return;
                }

                ItemInfoAppear();

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

                // - 외곽선
                SetOutline setoutlin_script = hitInfo2.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
        {
            layActivated = false;
        }
    }
示例#5
0
    // Use this for initialization
    void Awake()
    {
        _instance = this;

        _commandBuffer      = new CommandBuffer();
        _commandBuffer.name = "Outline";
        cam = GetComponent <Camera>();
        cam.AddCommandBuffer(CameraEvent.BeforeImageEffectsOpaque, _commandBuffer);
        mat  = new Material(Shader.Find("Hidden/Outline"));
        mat2 = new Material(Shader.Find("Hidden/OutlineBlur"));
        preRenderTextureID  = Shader.PropertyToID("_GlowPrePassTex");
        blurRenderTextureID = Shader.PropertyToID("_GlowBlurredTex");
        TempRenderTextureID = Shader.PropertyToID("TempTex");
    }
示例#6
0
    private void CheckLamp()
    {
        if (Physics.Raycast(MCamera.transform.position, MCamera.transform.TransformDirection(Vector3.forward), out puzzleInfo, range, layer))
        {
            if (OutlineController.get_outline_okay())
            {
                return;
            }

            if (puzzleInfo.transform.CompareTag("Puzzle")) //compare @
            {
                LampInfoAppear();

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

                // - 외곽선 그리기
                if (pre_ol_index == -1)
                {
                    SetOutline setoutlin_script = puzzleInfo.transform.GetComponent <SetOutline>();

                    if (setoutlin_script != null) // 두꺼비집이 아닐 경우
                    {
                        OutlineController.set_check(true);
                        OutlineController.set_enabled(setoutlin_script._index, true);
                        pre_ol_index   = setoutlin_script._index;
                        outline_active = true;
                    }
                    else
                    {
                        pre_ol_index = -2;
                        OutlineController.set_check(true);
                        outline_active = true;
                    }
                }
            }
        }
        else
        {
            InfoDisappear();

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

                // - 클릭버튼 해제
                actionCaption.SetActive(false);
            }
        }
    }
示例#7
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;
            }
        }
    }
示例#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);
                }
            }
        }
    }
示例#9
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);
            }
        }
    }
    private void Checkaction()
    {
        if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hitaction, range, layerMask))
        {
            //if (hitaction.transform.CompareTag("Action")) //compare @
            //{
            //    ActionAppear();
            //}

            if (hitaction.transform.CompareTag("Note")) //compare @
            {
                if (OutlineController.get_outline_okay())
                {
                    return;
                }

                NoteAppear();

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

                // - 외곽선
                SetOutline setoutlin_script = hitaction.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;
                }
            }

            //if (hitaction.transform.CompareTag("Door")) //compare @ //ActionController_Ending 스크립트에 있습니다
            //{
            //    DoorAppear();
            //}
        }
        else
        {
            ActionDisappear();

            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);
            }
        }
    }
示例#11
0
 // Use this for initialization
 void Start()
 {
     SetOutline.RegisterOutlineObject(this);
     tarColor = Color.black;
 }
示例#12
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;
                }
            }
        }
    }