Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetMouseButtonDown(0) && m_PageMode == PAGEMODE.FLITER_MENU)
        {
            if (!AppManager.IsMouseOverUI)
            {
                Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
                RaycastHit hit;
                if (Physics.Raycast(ray, out hit, 100))
                {
                    if (hit.collider.tag == "itemPlane")
                    {
                        PoivtMode mode = hit.collider.GetComponent <ItemPlaneController>().e_ItemPoivtMode;
                        showMainItem(mode);

                        m_PageModePanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, -150, 0), 0.6f);
                        e_mediaMainPanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, 0, 0), 0.6f);

                        m_PageMode = PAGEMODE.FLITER_PREVIEW;
                    }
                }
            }
        }

        if (e_webCameraTex != null && e_webCameraTex.isPlay)
        {
            for (int i = 0; i < planeObjArr.Length; i++)
            {
                planeObjArr[i].GetComponent <Renderer>().material.mainTexture = e_webCameraTex.cameraTexture;
            }
        }
    }
Esempio n. 2
0
 void showMainItem(PoivtMode mode)
 {
     for (int i = 0; i != planeObjArr.Length; i++)
     {
         ItemPlaneController itc = planeObjArr[i].GetComponent <ItemPlaneController>();
         if (itc.e_ItemPoivtMode == mode)
         {
             itc.showItem();
             m_PageMode = PAGEMODE.FLITER_PREVIEW;
         }
     }
 }