示例#1
0
 protected override void OnInit()
 {
     base.OnInit();
     this.m_HeadImg = Make <GameTexture>(gameObject);
     this.m_tweener = GetComponent <TweenRotationEuler>();
     this.m_effect  = Make <GameUIEffect>("UI_faliang_02");
 }
示例#2
0
        //private GameUIEffect m_effect = null;

        protected override void OnInit()
        {
            base.OnInit();
            m_Icon_img = Make <GameImage>("Image");
            m_Num_lab  = Make <GameLabel>("Text");
            m_item_btn = Make <GameToggleButton>(gameObject);
            m_item_btn.AddChangeCallBack(btnClick);
            m_Rota_tween = gameObject.GetComponent <TweenRotationEuler>();
            //this.m_effect = Make<GameUIEffect>("UI_xuanzhong");
        }
示例#3
0
        private void InitController()
        {
            m_entry_Tog   = new GameButton[MAXPANEL];
            this.m_maskBG = Make <GameUIComponent>("MaskBG");
            //m_entry_tog_show_tween_pos = new List<TweenPosition>();
            //m_entry_tog_hide_tween_pos = new List<TweenPosition>();
            //m_entry_tog_tween_alpha = new List<TweenAlpha>();
            this.m_activityUI            = Make <GameUIComponent>("ActivityAnimator");
            this.m_entryBackground       = new GameImage[MAXPANEL];
            m_red_points                 = new Dictionary <string, GameImage>();
            this.m_bottomUI              = Make <GameUIComponent>("Panel_down");
            this.m_bottomButtonComponent = Make <GameUIComponent>("Panel_down:mask:grid");
            this.m_gridComponent         = this.m_bottomButtonComponent.Widget.GetComponent <UnityEngine.UI.GridLayoutGroup>();
            for (int i = 0; i < MAXPANEL; i++)
            {
                m_entry_Tog[i] = Make <GameButton>(string.Format("Panel_down:mask:grid:Toggle_{0}", i + 1));
#if OFFICER_SYS
                if (i == 2)
                {
                    m_newPoliceEffect = m_entry_Tog[i].Make <GameUIEffect>("newPolice");
                }
#endif
                GameImage img = m_entry_Tog[i].Make <GameImage>("ImgWarn");
                m_red_points[m_panelName[i]] = img;
                this.m_entryBackground[i]    = m_entry_Tog[i].Make <GameImage>(m_entry_Tog[i].gameObject);
                btnEntry(i);
            }

            m_entry_tog_show_tween_pos = this.m_bottomButtonComponent.GetComponent <TweenPosition>();
            m_entry_tog_tween_alpha    = this.m_bottomButtonComponent.GetComponent <TweenAlpha>();
            m_entry_tog_show_tween_pos.SetTweenCompletedCallback(() => EnableBottomButtons(true));

            m_hide_btn              = Make <GameButton>("Panel_down:Button_hide");
            m_menuBtnTweener        = m_hide_btn.GetComponent <TweenRotationEuler>();
            m_btnSwitchRedPointMark = m_hide_btn.Make <GameImage>("ImgWarn");

            m_playerTaskPanelComponent             = Make <PlayerTaskComponent>("Panel_Task");
            this.m_taskPanel                       = m_playerTaskPanelComponent.Make <GameUIComponent>("Panel");
            m_activity_btn                         = Make <GameButton>("ActivityAnimator:Button_activities");
            m_activity_btn_effect                  = Make <GameUIEffect>("ActivityAnimator:Button_activities:UI_huodong_02");
            m_activity_btn_effect.EffectPrefabName = "UI_huodong_02.prefab";
            m_ActivityRedPoint                     = m_activity_btn.Make <GameImage>("ImgWarn");

#if OFFICER_SYS
            m_remove_red_points = new Dictionary <string, SafeAction>()
            {
                { m_panelName[0], GameEvents.RedPointEvents.Sys_OnNewEmailReadedEvent },
                { m_panelName[1], null },
                { m_panelName[2], null },
                { m_panelName[3], null },
                { m_panelName[4], GameEvents.RedPointEvents.Sys_OnNewAchievementReadedEvent },
                { m_panelName[5], null },
                { m_panelName[6], null /*GameEvents.RedPointEvents.Sys_OnNewFriendReadedEvent*/ },
            };
#else
            m_remove_red_points = new Dictionary <string, SafeAction>()
            {
                { m_panelName[0], GameEvents.RedPointEvents.Sys_OnNewEmailReadedEvent },
                { m_panelName[1], null },
                { m_panelName[2], null },
                { m_panelName[3], null },
                { m_panelName[4], GameEvents.RedPointEvents.Sys_OnNewAchievementReadedEvent },
                { m_panelName[5], null },
                { m_panelName[6], null },
            };
#endif

            this.m_panelDown = this.Transform.Find("Panel_down");

            m_push_gift_btn           = this.Make <GameButton>("ActivityAnimator:Button_activitiesgift");
            m_push_gift_count_root    = m_push_gift_btn.Make <GameLabel>("ImgWarn");
            m_push_gift_count_txt     = m_push_gift_btn.Make <GameLabel>("ImgWarn:Text");
            m_push_gift_left_time_txt = m_push_gift_btn.Make <GameLabel>("time");
            m_push_gift_view          = this.Make <GiftView>("Panel_activitiesgift");

            m_push_gift_btn_effect = this.Make <GameUIEffect>("ActivityAnimator:Button_activitiesgift:UI_huodong_03");
            m_push_gift_btn_effect.EffectPrefabName = "UI_huodong_03.prefab";


            m_combine_tips = Make <CombineTipsView>("Image");
        }
 protected override void OnInit()
 {
     base.OnInit();
     this.m_icon          = Make <GameImage>(gameObject);
     this.m_TweenRotation = this.m_icon.GetComponent <TweenRotationEuler>();
 }