Esempio n. 1
0
        protected override void OnInit()
        {
            base.OnInit();

            m_title_root     = this.Make <GameUIComponent>("Image");
            m_title_txt      = m_title_root.Make <GameLabel>("Text");
            m_title_txt.Text = string.Format("{0}!", LocalizeModule.Instance.GetString("recharge_title").ToUpper());
            m_title_effect   = m_title_root.Make <GameUIEffect>("UI_dengjishengji_01");
            m_title_effect.EffectPrefabName = "UI_dengjishengji_01.prefab";


            m_lvl_root       = this.Make <GameUIComponent>("Lvl_Root");
            m_from_lvl_txt   = m_lvl_root.Make <GameLabel>("Panel:Text (1)");
            m_to_lvl_txt     = m_lvl_root.Make <GameLabel>("Panel:Text (2)");
            m_lvl_slider     = m_lvl_root.Make <GameProgressBar>("Image_energy:Slider");
            m_cur_vit_txt    = m_lvl_root.Make <GameLabel>("Image_energy:Text_number");
            m_max_vit_txt    = m_lvl_root.Make <GameLabel>("Image_energy:Text_number_max");
            m_lvl_bar_effect = m_lvl_root.Make <GameUIEffect>("Image_energy:UI_tili_zengjia");
            m_lvl_bar_effect.EffectPrefabName = "UI_tili_zengjia.prefab";
            m_lvl_effect = m_lvl_root.Make <GameUIEffect>("Panel:UI_dengjishengji_02");
            m_lvl_effect.EffectPrefabName = "UI_dengjishengji_02.prefab";

            m_grid = this.Make <GameUIContainer>("Scroll View:Viewport");

            m_ok_btn    = this.Make <GameButton>("btnSure");
            m_btn_title = m_ok_btn.Make <GameLabel>("Text");
        }
Esempio n. 2
0
        private void InitController()
        {
            //m_icon_tex = Make<GameTexture>("icon");
            m_chooseRoot_obj    = Make <GameUIComponent>("Image");
            m_chooseContent_lab = m_chooseRoot_obj.Make <GameLabel>("content");

            m_textPanel_obj = m_chooseRoot_obj.gameObject.transform.Find("Panel_text").gameObject;
            m_imgPanel_obj  = m_chooseRoot_obj.gameObject.transform.Find("Panel_image").gameObject;

            m_text_toggle = new GameToggleButton[MaxChooseNum];
            m_img_toggle  = new GameToggleButton[MaxChooseNum];
            m_ask_img     = new GameImage[MaxChooseNum];
            m_ask_lab     = new GameLabel[MaxChooseNum];
            for (int i = 0; i < MaxChooseNum; i++)
            {
                m_text_toggle[i]         = m_chooseRoot_obj.Make <GameToggleButton>(string.Format("Panel_text:Toggle_{0}", i));
                m_img_toggle[i]          = m_chooseRoot_obj.Make <GameToggleButton>(string.Format("Panel_image:Toggle_{0}", i));
                m_ask_img[i]             = m_img_toggle[i].Make <GameImage>("Image");
                m_img_toggle[i].Visible  = false;
                m_ask_lab[i]             = m_text_toggle[i].Make <GameLabel>("Label");
                m_text_toggle[i].Visible = false;
            }

            m_textRoot_obj      = Make <GameButton>("Text");
            m_noContent_lab     = m_textRoot_obj.Make <GameLabel>("content");
            this.m_contentFader = m_noContent_lab.GetComponent <TextFader>();
            fontSize            = m_noContent_lab.Label.fontSize;
            //m_next_btn = Make<GameButton>("Button");
        }
Esempio n. 3
0
        protected override void OnInit()
        {
            base.OnInit();

            m_spine             = Make <GameSpine>("libao_01_SkeletonData");
            m_desc_root         = Make <GameUIComponent>("BG:Panel");
            m_desc_root.Visible = false;
            m_OK            = m_desc_root.Make <GameButton>("btnSure");
            m_Grid          = m_desc_root.Make <GameUIContainer>("ScrollView:Scroll_View");
            this.m_bagTrans = Transform.Find("BG/Bag");
        }
Esempio n. 4
0
        protected override void OnInit()
        {
            base.OnInit();

            m_skill_root     = this.Make <GameUIComponent>("Image:Skill");
            m_skill_icon     = m_skill_root.Make <GameImage>("Image");
            m_skill_lvl_txt  = m_skill_root.Make <GameLabel>("Image (1):Text");
            m_skill_desc_txt = m_skill_root.Make <GameLabel>("Image:Text");
            m_tex            = this.Make <GameTexture>("RawImage");
            m_lvl_icon       = m_tex.Make <GameImage>("icon");
            m_name_txt       = m_tex.Make <GameLabel>("title");

            m_keyword_root = this.Make <GameUIComponent>("Image:ScrollView");
            m_keyword_grid = m_keyword_root.Make <GameUIContainer>("Viewport");
        }
Esempio n. 5
0
        protected override void OnInit()
        {
            base.OnInit();

            m_scene_name  = Make <GameLabel>("Text");
            m_scene_desc  = Make <GameLabel>("Text (1)");
            m_output_root = Make <GameUIComponent>("Scroll View (1)");
            m_output_grid = m_output_root.Make <GameUIContainer>("Viewport");
        }
Esempio n. 6
0
        protected override void OnInit()
        {
            m_view_gifts_toggle = this.Make<ToggleWithArrowTween>("leftBtn:btn_GIFT");
            m_add_friend_toggle = this.Make<ToggleWithArrowTween>("leftBtn:btn_search");
            m_toggle_info = this.Make<ToggleWithArrowTween>("leftBtn:btn_friend");
            m_toggle_application = this.Make<ToggleWithArrowTween>("leftBtn:btn_application");
            m_toggle_confirm = this.Make<ToggleWithArrowTween>("leftBtn:btn_NOTICE");
            //m_toggle_seleted_effect = this.Make<GameUIEffect>("leftBtn:UI_haoyou");
            //m_toggle_seleted_effect.EffectPrefabName = "UI_haoyou.prefab";
            m_apply_red_point = this.Make<GameImage>("leftBtn:btn_application:Canvas:ImgWarn");
            m_confirm_red_point = this.Make<GameImage>("leftBtn:btn_NOTICE:Canvas:ImgWarn");
            m_gift_red_point = this.Make<GameImage>("leftBtn:btn_GIFT:Canvas:ImgWarn");
            m_friend_info_list_root = this.Make<GameUIComponent>("Panel_friend");
            m_friend_num_text = this.Make<GameLabel>("Panel_friend:Text_1");
            //m_friend_info_scrollview = this.Make<GameScrollView>("Panel_friend:Panel_friend");
            m_friend_info_grid = this.Make<GameUIContainer>("Panel_friend:Panel_friend:Content");

            m_friend_application_root = this.Make<GameUIComponent>("Panel_application");
            m_friend_application_grid = this.Make<GameUIContainer>("Panel_application:Panel_application:Content");
            m_friend_application_tips = m_friend_application_root.Make<GameLabel>("Text_Tips");
            m_friend_application_tips.Text = LocalizeModule.Instance.GetString("friend_ask_seven");
            m_application_switch = this.Make<GameSliderButton>("Panel_application:Toggle_1");
            m_ignore_all_btn = this.Make<GameImage>("Panel_application:btn_ignore");
            m_ignore_all_btn_text = m_ignore_all_btn.Make<GameLabel>("Text");
            m_ignore_all_btn_text.Text = LocalizeModule.Instance.GetString("friend_neglect_all");
            m_application_tip_text = m_friend_application_root.Make<GameLabel>("Text");
            m_application_tip_text.Text = LocalizeModule.Instance.GetString("friend_receive_ask");

            m_friend_confirm_root = this.Make<GameUIComponent>("Panel_notice");
            m_friend_confirm_grid = this.Make<GameUIContainer>("Panel_notice:Viewport");

            m_add_friend_root = this.Make<AddFriendNewUI>("Panel_search");
            m_gift_root = this.Make<GiftListNewUI>("Panel_gift");
            m_gift_root.Visible = false;

            m_recommend_btn = Make<GameButton>("Button");
            m_recommend_txt = m_recommend_btn.Make<GameLabel>("Text");
            m_recommend_txt.Text = LocalizeModule.Instance.GetString("friend_recommend");
            m_recommend_tips = m_recommend_btn.Make<GameLabel>("Text (1)");
            m_recommend_tips.Text = LocalizeModule.Instance.GetString("friend_recommend_dec");
        }
        protected override void OnInit()
        {
            base.OnInit();

            //IsFullScreen = true;

            this.m_play_mode_img    = this.Make <GameImage>("Panel_down:Image_sence:Image_mode");
            this.m_scene_name_label = this.Make <GameLabel>("Panel_down:Image_sence:Text");
            this.m_scene_tex        = this.Make <GameTexture>("Panel_down:Image_sence:Image:RawImage");

            this.m_cost_time_num_label = m_play_mode_img.Make <GameLabel>("Text");

            this.m_cost_vit_root = this.Make <GameUIComponent>("Panel_down:Vit_Root");
            m_vit_tweenalpha     = m_cost_vit_root.GetComponent <TweenAlpha>();
            m_vit_tweenscale     = m_cost_vit_root.GetComponent <TweenScale>();
            m_vit_tweenscale.AddTweenCompletedCallback(OnVitTweenFinished);
            this.m_cost_VIT_num_label = m_cost_vit_root.Make <GameLabel>("Text2");

            m_outputs_scroll = this.Make <GameScrollView>("Panel_down:Panel_reward:ScrollView");
            m_outputs_grid   = this.Make <GameUIContainer>("Panel_down:Panel_reward:ScrollView:Viewport");
            m_drop_scroll    = this.Make <GameScrollView>("Panel_down:Panel_drop:ScrollView");
            this.m_drop_grid = this.Make <GameUIContainer>("Panel_down:Panel_drop:ScrollView:Viewport");

            this.m_action_btn                    = this.Make <GameButton>("Panel_down:Button_action");
            this.m_infinity_vit_icon             = m_action_btn.Make <GameImage>("Image_free");
            m_action_btn_effect                  = m_action_btn.Make <GameUIEffect>("UI_tongyong_anniu");
            m_action_btn_effect.EffectPrefabName = "UI_tongyong_anniu.prefab";

            m_difficult_icon  = Make <GameImage>("Panel_down:Panel_level:Image");
            m_difficlut_step  = this.Make <GameLabel>("Panel_down:Panel_level:Text");
            m_exp_progress    = Make <GameProgressBar>("Panel_down:Panel_level:Slider");
            m_exp_txt         = this.Make <GameLabel>("Panel_down:Panel_level:Text (1)");
            m_exp_reward_icon = Make <GameImage>("Panel_down:Panel_level:Image_gift");

            this.SetCloseBtnID("Panel_down:Button_close");

            m_bg_img = Make <GameImage>("RawImage");
            //m_bg_alpha = m_bg_img.GetComponent<TweenAlpha>();
            m_tween_root = Make <GameUIComponent>("Panel_down");
            //m_show_tween_scale = m_tween_root.GetComponent<TweenScale>();
            //m_show_tween_scale.AddTweenCompletedCallback(ShowTweenScaleFinished);
            //var show_tween_poses = m_tween_root.GetComponents<TweenPosition>().Where((i) => UITweenerBase.TweenTriggerType.Manual == i.m_triggerType);
            //m_show_tween_pos = show_tween_poses.First();

            //var show_tween_alphas = m_tween_root.GetComponents<TweenAlpha>().Where((i) => UITweenerBase.TweenTriggerType.OnShow == i.m_triggerType);
            //m_show_tween_alpha = show_tween_alphas.First();

            var show_tween_poses = m_tween_root.GetComponents <TweenPosition>().Where((i) => UITweenerBase.TweenTriggerType.OnShow == i.m_triggerType);

            m_show_tween_pos = show_tween_poses.First();
            m_show_tween_pos.AddTweenCompletedCallback(ShowTweenPosFinished);
        }
Esempio n. 8
0
        protected override void OnInit()
        {
            base.OnInit();

            m_output_scroll         = Make <GameUIComponent>("Scroll View (1)");
            m_output_grid           = m_output_scroll.Make <GameUIContainer>("Viewport");
            m_drop_scroll           = Make <GameScrollView>("Scroll View");
            m_drop_grid             = m_drop_scroll.Make <GameUIContainer>("Viewport");
            m_drop_grid_ori_local_x = m_drop_grid.gameObject.transform.localPosition.x;
            m_drop_layout           = m_drop_grid.GetComponent <UnityEngine.UI.GridLayoutGroup>();
            m_drop_item_size_x      = m_drop_layout.cellSize.x;
            m_drop_item_space_x     = m_drop_layout.spacing.x;
        }
Esempio n. 9
0
        private void InitController()
        {
            m_pop_root    = Make <GameUIComponent>("Panel_use");
            m_title_lab   = m_pop_root.Make <GameLabel>("title");
            m_content_lab = m_pop_root.Make <GameLabel>("content");
            m_ticker_lbl  = m_content_lab.Make <GameLabel>("content_ticker");
            m_one_root    = m_pop_root.Make <GameLabel>("one");
            m_one_btn     = m_one_root.Make <GameButton>("btn0");
            m_one_lab     = m_one_btn.Make <GameLabel>("Text");

            m_two_root      = m_pop_root.Make <GameLabel>("two");
            m_twoFirst_btn  = m_two_root.Make <GameButton>("btn0");
            m_twoSecond_btn = m_two_root.Make <GameButton>("btn1");
            m_twoFirst_lab  = m_twoFirst_btn.Make <GameLabel>("Text");
            m_twoSecond_lab = m_twoSecond_btn.Make <GameLabel>("Text");

            m_ori_order_in_layer = this.Canvas.sortingOrder;

            m_close_btn = this.Make <GameButton>("Button_close");

            m_confirm_root = this.Make <ConfirmView>("confirm");
        }
Esempio n. 10
0
        //private GOGUI.TweenScale m_tweenPosShow = null;
        //private GOGUI.TweenAlpha m_TweenAlphaShow = null;

        //private GOGUI.TweenScale m_tweenPosHide = null;
        //private GOGUI.TweenAlpha m_TweenAlphaHide = null;

        protected override void OnInit()
        {
            base.OnInit();
            m_tex            = this.Make <GameTexture>("RawImage");
            m_left_btn       = this.Make <GameButton>("Button");
            m_right_btn      = this.Make <GameButton>("Button (1)");
            m_buy_btn        = this.Make <GameButton>("btn_buy");
            m_buy_title      = m_buy_btn.Make <GameLabel>("Text");
            m_buy_title.Text = LocalizeModule.Instance.GetString("goods_buy");
            m_price_txt      = m_buy_btn.Make <GameLabel>("Text_cost");
            m_bought_img     = this.Make <GameImage>("Image_purchased");
            m_toggle_grid    = this.Make <GameUIContainer>("ScrollView:Viewport");
            m_close_btn      = this.Make <GameButton>("Button_close");
            m_detail_btn     = this.Make <GameButton>("Button_detail");
            m_detail_root    = this.Make <GameUIComponent>("giftdetail");
            m_detail_txt     = m_detail_root.Make <GameLabel>("Text");

            //GOGUI.TweenScale[] tweenPos = this.m_tex.GetComponents<GOGUI.TweenScale>();
            //for (int i = 0; i < tweenPos.Length; i++)
            //{
            //    if (tweenPos[i].style == GOGUI.UITweenerBase.Style.Once)
            //    {
            //        m_tweenPosShow = tweenPos[i];
            //    }
            //    else if (tweenPos[i].style == GOGUI.UITweenerBase.Style.OnHide)
            //    {
            //        m_tweenPosHide = tweenPos[i];
            //    }
            //}

            //GOGUI.TweenAlpha[] TweenAlpha = this.m_tex.GetComponents<GOGUI.TweenAlpha>();
            //for (int i = 0; i < TweenAlpha.Length; i++)
            //{
            //    if (TweenAlpha[i].style == GOGUI.UITweenerBase.Style.Once)
            //    {
            //        m_TweenAlphaShow = TweenAlpha[i];
            //    }
            //    else if (TweenAlpha[i].style == GOGUI.UITweenerBase.Style.OnHide)
            //    {
            //        m_TweenAlphaHide = TweenAlpha[i];
            //    }
            //}
        }
Esempio n. 11
0
        private void OnLoad(string name_, UnityEngine.Object obj)
        {
            if (null != m_play_root)
            {
                m_play_root.Visible = false;
                m_play_root.Dispose(false);

                GameObject.DestroyImmediate(m_play_root.gameObject);
            }
            m_cam = CameraManager.Instance.UICamera;

            GameObject cartoon_item = (GameObject)obj;

            cartoon_item.name = m_level_id.ToString();
            cartoon_item.transform.SetParent(this.gameObject.transform);
            cartoon_item.transform.localPosition = Vector3.zero;
            cartoon_item.transform.localScale    = Vector3.one;
            m_play_root = this.Make <GameUIComponent>(cartoon_item);
            m_play_root.Widget.anchoredPosition = Vector2.zero;
            m_play_root.Widget.sizeDelta        = Vector2.zero;
            m_play_root.Visible = true;

            //m_play_root = cartoon_item.GetComponent<RectTransform>();
            //m_play_root.anchoredPosition = Vector2.zero;
            //m_play_root.sizeDelta = Vector2.zero;
            //m_play_root.gameObject.SetActive(true);

            m_play_rect = m_play_root.Make <GameUIComponent>("Play_Rect");
            m_play_rect.Widget.GetWorldCorners(m_play_rect_4_corners);

            //m_play_rect = m_play_root.Find("Play_Rect").GetComponent<RectTransform>();
            //m_play_rect.GetWorldCorners(m_play_rect_4_corners);

            m_cartoon = m_play_root.GetComponent <CartoonTemplate>();
            m_cartoon.m_template_id = this.m_level_id;

            this.LoadClipByVideoName(CartoonDataManager.Instance.GetData(this.m_level_id));


            EngineCoreEvents.ResourceEvent.ReleaseAssetEvent.SafeInvoke(name_, obj);
        }
Esempio n. 12
0
        protected override void OnInit()
        {
            base.OnInit();
            m_desc_txt         = this.Make <GameLabel>("Panel_down:Image_1:Text");
            m_output_title_txt = this.Make <GameLabel>("Panel_down:RawImage:Panel_output:Text_2");
            m_time_txt         = Make <GameLabel>("Panel_down:RawImage:Panel_output:Image:Text");
            m_thumbnail_tex    = Make <GameTexture>("Panel_down:RawImage");
            m_output_grid      = this.Make <GameUIContainer>("Panel_down:RawImage:Panel_output:Grid");

            m_case_name_txt        = this.Make <GameLabel>("Panel_down:RawImage:Image:Text");
            m_action_btn           = this.Make <GameButton>("Panel_down:btn_action");
            m_action_btn_title_txt = m_action_btn.Make <GameLabel>("Text");
            m_action_btn_effect    = m_action_btn.Make <GameUIEffect>("UI_pintukaishi_anniu");
            m_action_btn_effect.EffectPrefabName = "UI_pintukaishi_anniu.prefab";
            m_ticket_icon        = m_action_btn.Make <GameImage>("Image_item");
            m_action_btn_num_txt = m_action_btn.Make <GameLabel>("Text_item");

            this.m_btnClose = Make <GameButton>("Panel_down:Button_close");

            m_video_root = Make <GameUIComponent>("Panel_down:video_Image");
            m_video      = m_video_root.Make <GameVideoComponent>("RawImage_Video");


            m_btn_play_video  = Make <GameImage>("Panel_down:RawImage:Image_play");
            m_btn_close_video = m_video.Make <GameButton>("Btn_Close_Video");

            m_bg_img     = Make <GameImage>("RawImage");
            m_bg_alpha   = m_bg_img.GetComponent <TweenAlpha>();
            m_tween_root = Make <GameUIComponent>("Panel_down");
            //m_show_tween_scale = m_tween_root.GetComponent<TweenScale>();
            //m_show_tween_scale.AddTweenCompletedCallback(ShowTweenScaleFinished);
            //var show_tween_poses = m_tween_root.GetComponents<TweenPosition>().Where((i) => UITweenerBase.TweenTriggerType.Manual == i.m_triggerType);
            //m_show_tween_pos = show_tween_poses.First();

            //var show_tween_alphas = m_tween_root.GetComponents<TweenAlpha>().Where((i) => UITweenerBase.TweenTriggerType.OnShow == i.m_triggerType);
            //m_show_tween_alpha = show_tween_alphas.First();
        }
Esempio n. 13
0
        private void FindUIComponent()
        {
            this.m_iconRoot = TryMake <GameUIComponent>("Background");

            if (null != this.m_iconRoot)
            {
                m_icon = m_iconRoot.Make <GameImage>("Image");
            }
            else
            {
                m_icon = Make <GameImage>("Image");
            }

            //m_tweenPos = m_icon.GetComponent<TweenScale>();
            m_num_root = this.TryMake <GameImage>("Background/Image (1)");
            if (null != m_num_root)
            {
                m_num_txt = m_num_root.Make <GameLabel>("Text");
            }
            else
            {
                m_num_txt = m_icon.TryMake <GameLabel>("Text");
            }
        }