// 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; } } }
public void showMediaItem() { hideMediaItem(); m_PageModePanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, 0, 0), 0.6f); e_mediaMainPanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, -150, 0), 0.6f); m_PageMode = PAGEMODE.FLITER_MENU; }
public void ApplyBtnClicked() { if (m_PageMode == PAGEMODE.DECORATE_STICKER) { if (e_decoratePanlObjUGUI != null) { e_decoratePanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, 0, 0), 0.6f); } if (e_stikcerScrowViewPanlObjUGUI != null) { e_stikcerScrowViewPanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, -150, 0), 0.6f); } m_PageMode = PAGEMODE.DECORATE_MENU; if (e_tipWindowCtr != null) { e_tipWindowCtr.Hide(); } if (m_stickerController != null) { m_stickerController.setWork(false); } } else if (m_PageMode == PAGEMODE.DECORATE_FRAME) { if (e_decoratePanlObjUGUI != null) { e_decoratePanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, 0, 0), 0.6f); } if (e_frameScrowViewPanlObjUGUI != null) { e_frameScrowViewPanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, -150, 0), 0.6f); } m_PageMode = PAGEMODE.DECORATE_MENU; if (e_tipWindowCtr != null) { e_tipWindowCtr.Hide(); } } else if (m_PageMode == PAGEMODE.DECORATE_TEXT) { if (e_decoratePanlObjUGUI != null) { e_decoratePanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, 0, 0), 0.6f); } if (e_textPanlObjUGUI != null) { e_textPanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, -150, 0), 0.6f); } m_PageMode = PAGEMODE.DECORATE_MENU; if (e_tipWindowCtr != null) { e_tipWindowCtr.Hide(); } if (m_textController != null) { m_textController.setWork(false); } } }
// Use this for initialization void Start() { m_PageMode = PAGEMODE.FLITER_MENU; m_stickerController = GameObject.Find("StickerManager").GetComponent <StickerManager>(); m_frameController = GameObject.Find("FrameManager").GetComponent <FrameController> (); m_textController = GameObject.Find("TextManager").GetComponent <TextManager> (); instance = this; }
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; } } }
public void FrameBtnClicked() { if (e_decoratePanlObjUGUI != null) { e_decoratePanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, -150, 0), 0.6f); } if (e_frameScrowViewPanlObjUGUI != null) { e_frameScrowViewPanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, 0, 0), 0.6f); } m_PageMode = PAGEMODE.DECORATE_FRAME; }
public void TextBtnClicked() { if (e_decoratePanlObjUGUI != null) { e_decoratePanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, -150, 0), 0.6f); } if (e_textPanlObjUGUI != null) { e_textPanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, 0, 0), 0.6f); } if (m_textController != null) { m_textController.setWork(true); } m_PageMode = PAGEMODE.DECORATE_TEXT; }
public void StickerBtnClicked() { if (e_decoratePanlObjUGUI != null) { e_decoratePanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, -150, 0), 0.6f); } if (e_stikcerScrowViewPanlObjUGUI != null) { e_stikcerScrowViewPanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, 0, 0), 0.6f); } if (m_stickerController != null) { m_stickerController.setWork(true); } m_PageMode = PAGEMODE.DECORATE_STICKER; }
// Use this for initialization void Start() { if (mPhotoTex == null) { mPhotoTex = new Texture2D((int)Screen.width, (int)Screen.height, TextureFormat.RGB24, false); } m_PageMode = PAGEMODE.FLITER_MENU; m_stickerController = GameObject.Find("StickerManager").GetComponent <StickerManager>(); m_frameController = GameObject.Find("FrameManager").GetComponent <FrameController> (); m_textController = GameObject.Find("TextManager").GetComponent <TextManager> (); Everyplay.RecordingStopped += OnStopRecordingEvent; Everyplay.RecordingStarted += StartRecordingEvent; instance = this; PluginManager.Init(); }
public void setMainPlayBtnClicked() { if (m_isReco) { if (RecoManager.isSupportRec()) { if (m_PageMode == PAGEMODE.FLITER_RECO && RecoManager.IsRecording()) { e_RecoManager.StopReco(); m_PageMode = PAGEMODE.FLITER_PREVIEW; } else { m_PageMode = PAGEMODE.FLITER_RECO; e_RecoManager.StartReco1(); } } } else { if (manager.userMode == manager.UserMode.Upload) { if (manager.uploadState) //stop upload //targetAudioSource.Stop (); //Audio { manager.uploadState = false; PluginManager.stopUploading(); //Video(play in pngMaker.cs) } else //start upload //targetAudioSource.Play (); //Audio { manager.uploadState = true; PluginManager.startUploading(); //Video(play in pngMaker.cs) } } } }
public void setCameraFreeze() { if (m_PageMode == PAGEMODE.FLITER_PREVIEW) { PhotoController.ScreenCaptureFinished += getTextureFromCaptrue; } e_photoController.startRenderCameraForEdit(); if (e_webCameraTex != null) { e_webCameraTex.setCameraFreeze(); } if (e_decoratePanlObjUGUI != null) { e_decoratePanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, 0, 0), 0.6f); } if (e_mediaMainPanlObjUGUI != null) { e_mediaMainPanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, -150, 0), 0.6f); } //open the left top back btn; if (e_BackBtnObjUGUI != null) { e_BackBtnObjUGUI.GetComponent <RectTransform>().DOScale(new Vector3(1, 1, 1), 0.6f); } //open the left top share btn; if (e_ShareBtnObjUGUI != null) { e_ShareBtnObjUGUI.GetComponent <RectTransform>().DOScale(new Vector3(1, 1, 1), 0.6f); } if (e_ReverseCameraBtnObjUGUI != null) { e_ReverseCameraBtnObjUGUI.GetComponent <RectTransform>().DOScale(new Vector3(0, 0, 0), 0.4f); } m_PageMode = PAGEMODE.DECORATE_MENU; }
public void BackBtnClicked() { switch (m_PageMode) { case PAGEMODE.DECORATE_FRAME: { if (m_frameController.isNeedApply) { if (e_tipWindowCtr != null) { e_tipWindowCtr.Show(); } } else { if (e_decoratePanlObjUGUI != null) { e_decoratePanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, 0, 0), 0.6f); } if (e_frameScrowViewPanlObjUGUI != null) { e_frameScrowViewPanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, -150, 0), 0.6f); } m_frameController.ClearAll(); m_PageMode = PAGEMODE.DECORATE_MENU; } } break; case PAGEMODE.DECORATE_STICKER: { if (m_stickerController.isNeedApply) { if (e_tipWindowCtr != null) { e_tipWindowCtr.Show(); } } else { if (e_decoratePanlObjUGUI != null) { e_decoratePanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, 0, 0), 0.6f); } if (e_stikcerScrowViewPanlObjUGUI != null) { e_stikcerScrowViewPanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, -150, 0), 0.6f); } if (m_stickerController != null) { m_stickerController.setWork(false); } m_PageMode = PAGEMODE.DECORATE_MENU; } } break; case PAGEMODE.DECORATE_MENU: { if (e_decoratePanlObjUGUI != null) { e_decoratePanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, -150, 0), 0.6f); } if (e_mediaMainPanlObjUGUI != null) { e_mediaMainPanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, 0, 0), 0.6f); } setCameraActive(); if (e_PhotoMaskTex != null) { e_PhotoMaskTex.SetActive(false); } if (e_BackBtnObjUGUI != null) { e_BackBtnObjUGUI.GetComponent <RectTransform>().DOScale(new Vector3(0, 0, 0), 0.6f); } //open the left top share btn; if (e_ShareBtnObjUGUI != null) { e_ShareBtnObjUGUI.GetComponent <RectTransform>().DOScale(new Vector3(0, 0, 0), 0.5f); } if (e_ReverseCameraBtnObjUGUI != null) { e_ReverseCameraBtnObjUGUI.GetComponent <RectTransform>().DOScale(new Vector3(1, 1, 1), 0.6f); } if (m_stickerController != null) { m_stickerController.ClearAll(); } if (m_textController != null) { m_textController.ClearAll(); } if (m_frameController != null) { m_frameController.ClearAll(); } m_PageMode = PAGEMODE.FLITER_PREVIEW; } break; case PAGEMODE.DECORATE_TEXT: { if (m_textController != null && m_textController.isNeedApply) { if (e_tipWindowCtr != null) { e_tipWindowCtr.Show(); } } else { if (e_decoratePanlObjUGUI != null) { e_decoratePanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, 0, 0), 0.6f); } if (e_textPanlObjUGUI != null) { e_textPanlObjUGUI.GetComponent <RectTransform> ().DOLocalMove(new Vector3(0, -150, 0), 0.6f); } if (m_textController != null) { m_textController.setWork(false); } m_PageMode = PAGEMODE.DECORATE_MENU; } } break; } }