Esempio n. 1
0
    protected override void OnStart(Transform root)
    {
        MyEventCenter.AddListener <ENormalTuType, List <FileInfo> >(E_GameEvent.DaoRu_Jpg_FromFile, E_OnDaoRu);
        MyEventCenter.AddListener <ENormalTuType, List <ResultBean> >(E_GameEvent.DaoRu_Jpg_FromResult, E_ResultDaoRu);
        MyEventCenter.AddListener <EGameType>(E_GameEvent.ClickTrue, E_DelteTrue);
        MyEventCenter.AddListener <EGameType, ResultBean>(E_GameEvent.ShowSingleTuInfo, E_ShowNormalTuInfo);
        MyEventCenter.AddListener <EGameType>(E_GameEvent.CloseSingleTuInfo, E_CloseNormalTuInfo);
        MyEventCenter.AddListener <EGameType>(E_GameEvent.OnClickNoSaveThis, E_OnClickNoSaveThis);
        MyEventCenter.AddListener(E_GameEvent.DelteAll, E_DeleteAll);
        MyEventCenter.AddListener <bool>(E_GameEvent.ShowChangeSizeSlider, E_IsShowChangeSize);
        MyEventCenter.AddListener <EGameType, string>(E_GameEvent.SureGeiMing, E_OnSureGaiMing);



        // 模版
        go_MoBan = GetGameObject("Top/SrcollRect/MoBan");


        // 内容
        dt5_Contrl  = Get <DTToggle5_Fade>("Top/SrcollRect");
        m_SrollView = Get <ScrollRect>("Top/SrcollRect");

        // 底下
        tg_BottomContrl = Get <UGUI_ToggleGroup>("Bottom/Contant");
        tg_BottomContrl.OnChangeValue += E_OnBottomValueChange;
        tg_BottomContrl.OnDoubleClick += E_OnBottomDoubleClick;

        tx_BottomName1 = Get <Text>("Bottom/Contant/GeShiItem1/Text");
        tx_BottomName2 = Get <Text>("Bottom/Contant/GeShiItem2/Text");
        tx_BottomName3 = Get <Text>("Bottom/Contant/GeShiItem3/Text");
        tx_BottomName4 = Get <Text>("Bottom/Contant/GeShiItem4/Text");
        tx_BottomName5 = Get <Text>("Bottom/Contant/GeShiItem5/Text");



        // 双击显示信息
        go_Top    = GetGameObject("Top");
        go_Bottom = GetGameObject("Bottom");


        // 右边
        AddButtOnClick("Top/Left/DaoRu", Btn_DaoRu);
        AddButtOnClick("Top/Left/DeleteAll", Btn_Delete);



        //改变 Grid 大小
        l_Grids           = Gets <UGUI_Grid>("Top/SrcollRect");
        go_ChangeSize     = GetGameObject("Top/Left/ChangeSize");
        slider_ChangeSize = Get <Slider>("Top/Left/ChangeSize/Slider");
        tx_Size           = Get <Text>("Top/Left/ChangeSize/TxSize");
        AddSliderOnValueChanged(slider_ChangeSize, Slider_OnGridSizeChange);
        input_Size = Get <InputField>("Top/Left/ChangeSize/InputSize");
        AddInputOnEndEdit(input_Size, Input_SizeEdit);
    }
Esempio n. 2
0
    protected override void OnStart(Transform root)
    {
        MyEventCenter.AddListener <EXuLieTu, List <FileInfo> >(E_GameEvent.DaoRu_XLT_FromFile, E_OnDaoRu);         // 导入
        MyEventCenter.AddListener <EXuLieTu, List <ResultBean> >(E_GameEvent.DaoRu_XLT_FromResult, E_ResultDaoRu); // 结果导入
        MyEventCenter.AddListener <EGameType>(E_GameEvent.ClickTrue, E_DelteTrue);                                 // 确定删除
        MyEventCenter.AddListener(E_GameEvent.DelteAll, E_DeleteAll);                                              // 删除全部
        MyEventCenter.AddListener <EGameType>(E_GameEvent.CloseDuoTuInfo, E_CloseDuoTuInfo);                       // 关闭多图信息
        MyEventCenter.AddListener <EGameType, string[]>(E_GameEvent.OnClickNoSaveThisDuoTu, E_DeleteOne);          // 多图信息中删除一个



        // 模版
        go_MoBan = GetGameObject("Top/Contant/MoBan");


        // 上方
        go_Top          = GetGameObject("Top");
        toggle5_Contant = Get <DTToggle5_Fade>("Top/Contant/ScrollView");
        mScrollRect     = Get <ScrollRect>("Top/Contant/ScrollView");
        rt_Grid1        = Get <RectTransform>("Top/Contant/ScrollView/Item1");
        rt_Grid2        = Get <RectTransform>("Top/Contant/ScrollView/Item2");
        rt_Grid3        = Get <RectTransform>("Top/Contant/ScrollView/Item3");
        rt_Grid4_Shu    = Get <RectTransform>("Top/Contant/ScrollView/Item4/Shu");
        rt_Grid4_Heng   = Get <RectTransform>("Top/Contant/ScrollView/Item4/Heng");
        rt_Grid5_Shu    = Get <RectTransform>("Top/Contant/ScrollView/Item5/Shu");
        rt_Grid5_Heng   = Get <RectTransform>("Top/Contant/ScrollView/Item5/Heng");



        // 底下
        go_Bottom       = GetGameObject("Bottom");
        tg_BottomContrl = Get <UGUI_ToggleGroup>("Bottom/Contant");
        tg_BottomContrl.OnChangeValue += E_OnBottomContrlChange;
        tx_BottomName1 = Get <Text>("Bottom/Contant/GeShiItem1/Text");
        tx_BottomName2 = Get <Text>("Bottom/Contant/GeShiItem2/Text");
        tx_BottomName3 = Get <Text>("Bottom/Contant/GeShiItem3/Text");


        // 右边
        btn_DaoRu = Get <Button>("Top/Left/DaoRu");
        AddButtOnClick(btn_DaoRu, Btn_OnDaoRu);
        AddButtOnClick("Top/Left/DeleteAll", Btn_DeleteOneLine);
    }
Esempio n. 3
0
    protected override void OnStart(Transform root)
    {
        MyEventCenter.AddListener <EAudioType, AudioResBean>(E_GameEvent.DaoRu_Audio, E_DaoRu_Audio);     // 从导入
        MyEventCenter.AddListener <EGameType>(E_GameEvent.ClickTrue, E_DelteTrue);                        // 确定删除
        MyEventCenter.AddListener(E_GameEvent.DelteAll, E_DeleteAll);                                     // 删除所有
        MyEventCenter.AddListener <EGameType, string>(E_GameEvent.SureGeiMing, E_OnSureGaiMing);          // 确定改名

        MyEventCenter.AddListener <float>(E_GameEvent.ChangeAudioVolumeing, E_OnChangeAudioVolume);       // 改变音量
        MyEventCenter.AddListener <float>(E_GameEvent.ChangeAudioVolumeEnd, E_OnChangeAudioVolumeEnd);    // 结束改变音量



        foreach (EAudioType type in Enum.GetValues(typeof(EAudioType)))
        {
            typeK_BeanListV.Add(type, new List <EachItemBean>());
        }


        mAudioSource = mUITransform.parent.parent.Find("AudioSource").GetComponent <AudioSource>();


        // 内容
        go_MoBan    = GetGameObject("Top/Contant/ScrollView/MoBan");
        m_SrollView = Get <ScrollRect>("Top/Contant/ScrollView");
        dt5_Contrl  = Get <DTToggle5_Fade>("Top/Contant/ScrollView");


        // 底下
        tg_BottomContrl = Get <UGUI_ToggleGroup>("Bottom/Contant");
        tg_BottomContrl.OnChangeValue += E_OnBottomValueChange;
        tg_BottomContrl.OnDoubleClick += E_OnBottomDoubleClick;

        tx_BottomName1 = Get <Text>("Bottom/Contant/GeShiItem1/Text");
        tx_BottomName2 = Get <Text>("Bottom/Contant/GeShiItem2/Text");
        tx_BottomName3 = Get <Text>("Bottom/Contant/GeShiItem3/Text");
        tx_BottomName4 = Get <Text>("Bottom/Contant/GeShiItem4/Text");
        tx_BottomName5 = Get <Text>("Bottom/Contant/GeShiItem5/Text");



        // 右边
        AddButtOnClick("Top/Left/DaoRu", Btn_OnDaoRu);
        AddButtOnClick("Top/Left/DeleteAll", Btn_DeleteOneLine);
        AddToggleOnValueChanged("Top/Left/IsHuoTai/Toggle", Toggle_IsHuoTai);

        // 音量
        dt4_Volume    = Get <DTToggle4_Fade>("Top/Left/Volume/Icon");
        slider_Volume = Get <Slider>("Top/Left/Volume/Slider");
        AddSliderOnValueChanged(slider_Volume, (value) =>
        {
            MyEventCenter.SendEvent(E_GameEvent.ChangeAudioVolumeing, value);
        });
        Get <SliderEvent>("Top/Left/Volume/Slider").E_OnDragEnd += () =>
        {
            MyEventCenter.SendEvent(E_GameEvent.ChangeAudioVolumeEnd, slider_Volume.value);
        };

        // 导入失败界面
        go_DaoRuError     = GetGameObject("DaoRuError");
        rt_ErrorDRContant = Get <RectTransform>("DaoRuError/Contant/Error/Contant");
        moBan_Error       = GetGameObject("DaoRuError/Contant/Error/MoBan_Error");
        moBan_Ok          = GetGameObject("DaoRuError/Contant/Error/MoBan_Ok");
        AddButtOnClick("DaoRuError/Contant/BtnSure", Btn_ErrorUIClickSure);
    }