Exemplo n.º 1
0
    void Awake()
    {
        _PassiveProp_Container = transform.Find("ConsumeProp_Container");
        _closeBtn = _PassiveProp_Container.Find("CloseBtn").GetComponent <UIButton>();
        UIHelper.AddBtnClick(_closeBtn, OnClose);

        _info_Container       = _PassiveProp_Container.Find("infoWidget");
        _itemName             = _info_Container.Find("name_Label").GetComponent <UILabel>();
        _number_Label         = _info_Container.Find("number_Label").GetComponent <UILabel>();
        _number_Label.color   = UICommon.FONT_COLOR_GREY;
        _value_Label          = _info_Container.Find("number_Label/value_Label").GetComponent <UILabel>();
        _value_Label.color    = UICommon.FONT_COLOR_GREEN;
        _describe_Label       = _info_Container.Find("describe_Label").GetComponent <UILabel>();
        _describe_Label.color = UICommon.FONT_COLOR_GREY;
        _itemiconbg           = _info_Container.Find("itemiconbg").GetComponent <UISprite>();
        _itemicon             = _info_Container.Find("itemiconbg/itemicon").GetComponent <UITexture>();

        _AddBtn                = _PassiveProp_Container.Find("trainContainer/AddBtn").GetComponent <UIButton>();
        _DelBtn                = _PassiveProp_Container.Find("trainContainer/DelBtn").GetComponent <UIButton>();
        _TankItem_Slider       = _PassiveProp_Container.Find("trainContainer/TankItem_Slider").GetComponent <UISlider>();
        _AddTankNumLabel       = _PassiveProp_Container.Find("trainContainer/AddTankNumLabel").GetComponent <UILabel>();
        _AddTankNumLabel.color = UICommon.FONT_COLOR_ORANGE;
        UIHelper.AddBtnClick(_AddBtn, OnAdd);
        UIHelper.AddBtnClick(_DelBtn, OnDel);

        _okBtn             = _PassiveProp_Container.Find("ok_Btn").GetComponent <UIButton>();
        _cancelBtn         = _PassiveProp_Container.Find("cancel_Btn").GetComponent <UIButton>();
        _okLabel           = _PassiveProp_Container.Find("ok_Btn/Label").GetComponent <UILabel>();
        _cancelLabel       = _PassiveProp_Container.Find("cancel_Btn/Label").GetComponent <UILabel>();
        _okLabel.color     = UICommon.FONT_COLOR_GOLDEN;
        _cancelLabel.color = UICommon.FONT_COLOR_GOLDEN;
        UIHelper.AddBtnClick(_okBtn, OnOK);
        UIHelper.AddBtnClick(_cancelBtn, OnCancel);
    }
Exemplo n.º 2
0
    public override void Init()
    {
        base.Init();

        // 关闭
        UIButton closedBtn = UIHelper.FindChildInObject(this.gameObject, "Bg").GetComponent <UIButton> ();

        UIHelper.AddBtnClick(closedBtn, OnClosed);

        Content_Table = UIHelper.FindChildInObject(this.gameObject, "Content_Table").GetComponent <UITable>();
        ui_scrollview = UIHelper.FindChildInObject(this.gameObject, "Scroll_View").GetComponent <UIScrollView>();

        left_label  = UIHelper.FindChildInObject(this.gameObject, "Left_Label").GetComponent <UILabel>();
        clear_label = UIHelper.FindChildInObject(this.gameObject, "Btn_Clear/Label").GetComponent <UILabel>();

        UIHelper.AddBtnClick(this.gameObject, "Btn_Clear", OnClearClicked);
        UIHelper.AddBtnClick(this.gameObject, "Btn_Confirm", OnConfirmClicked);


        // 计算UI高度
        CalcUIHeight();

        // 奖励条目
        all_item_count = InstancePlayer.instance.multiFightPrizeItems.Count;
    }
Exemplo n.º 3
0
 void Awake()
 {
     _grayList.Clear();
     _Container = transform.Find("Rank_Container");
     _close_Btn = _Container.Find("close_Btn").GetComponent <UIButton>();
     UIHelper.AddBtnClick(_close_Btn, OnClose);
     _namePanel = _Container.Find("panelName_Label").GetComponent <UILabel>();
     _grayList.Add(_namePanel);
     _1_Label = _Container.Find("1_Label").GetComponent <UILabel>();
     _2_Label = _Container.Find("2_Label").GetComponent <UILabel>();
     _3_Label = _Container.Find("3_Label").GetComponent <UILabel>();
     _4_Label = _Container.Find("4_Label").GetComponent <UILabel>();
     _5_Label = _Container.Find("5_Label").GetComponent <UILabel>();
     _grayList.Add(_1_Label);
     _grayList.Add(_2_Label);
     _grayList.Add(_3_Label);
     _grayList.Add(_4_Label);
     _grayList.Add(_5_Label);
     _Grid       = _Container.Find("ScrollView/Grid").GetComponent <UIGrid>();
     _scrollview = _Container.Find("ScrollView").GetComponent <UIScrollView>();
     foreach (UILabel label in _grayList)
     {
         label.color = UICommon.FONT_COLOR_GREY;
     }
 }
Exemplo n.º 4
0
    public void AddBtnClick()
    {
        Transform tabs = UIHelper.FindChildInObject(gameObject, "bottom_btn_title").transform;

        for (int i = 0; i < BOTTOM_TAB_COUNT; ++i)
        {
            UIButton btn = tabs.Find("tab_btn_" + i).GetComponent <UIButton>();
            UIHelper.AddBtnClick(btn, OnBottomBtnClick);
        }

        Transform tank_container = UIHelper.FindChildInObject(gameObject, "team_btn_container").transform;

        for (int i = 0; i < TEAM_COUNT; ++i)
        {
            formation_select_btn[i] = tank_container.Find("team_btn_" + i).GetComponent <UIButton>();
            UIHelper.AddBtnClick(formation_select_btn[i], OnSelectTeamClick);
        }

        // 军官
        UIButton btn_hero = tabs.Find("tab_hero").GetComponent <UIButton>();

        UIHelper.AddBtnClick(btn_hero, OnHeroBtnClick);

        // 关闭
        UIHelper.AddBtnClick(_close_btn, OnClosed);

        // 保存
        UIHelper.AddBtnClick(_battle_btn, OnSave);

        // 一键补兵
        UIHelper.AddBtnClick(_replenish_btn, OnReplenish);
    }
Exemplo n.º 5
0
 void Awake()
 {
     _gameObject.Clear();
     _parent = this.transform;
     _bg_btn = _parent.Find("bg_btn").GetComponent <UIButton>();
     UIHelper.AddBtnClick(_bg_btn, OnClickItem);
     _iconTexture           = _parent.Find("iconTexture").GetComponent <UITexture>();
     _angle_Sprite          = _parent.Find("angle_Sprite").GetComponent <UISprite>();
     _Vip_Sprite            = _parent.Find("angle_Sprite/Vip_Sprite").GetComponent <UISprite>();
     _Double_Sprite         = _parent.Find("angle_Sprite/Sprite").GetComponent <UISprite>();
     _num_Label             = _parent.Find("num_Label").GetComponent <UILabel>();
     _num_Label.color       = UICommon.FONT_COLOR_GREY;
     _can_Label             = _parent.Find("can_Label").GetComponent <UILabel>();
     _can_Label.color       = UICommon.FONT_COLOR_GREEN;
     _have_Sprite           = _parent.Find("have_Sprite").GetComponent <UISprite>();
     _num_right_Label       = _parent.Find("num_right_Label").GetComponent <UILabel>();
     _num_right_Label.color = UICommon.FONT_COLOR_GREY;
     _receive_Sprite        = _parent.Find("receive_Sprite").GetComponent <UISprite>();
     _gameObject.Add(_angle_Sprite.gameObject);
     _gameObject.Add(_num_Label.gameObject);
     _gameObject.Add(_can_Label.gameObject);
     _gameObject.Add(_have_Sprite.gameObject);
     _gameObject.Add(_num_right_Label.gameObject);
     _gameObject.Add(_receive_Sprite.gameObject);
     foreach (GameObject g in _gameObject)
     {
         g.SetActive(false);
     }
 }
Exemplo n.º 6
0
    void Awake()
    {
        _InitiativeProp_Container = transform.Find("NormalProp_Container");
        _closeBtn = _InitiativeProp_Container.Find("CloseBtn").GetComponent <UIButton>();
        UIHelper.AddBtnClick(_closeBtn, OnClose);

        _info_Container       = _InitiativeProp_Container.Find("infoWidget");
        _itemName             = _info_Container.Find("name_Label").GetComponent <UILabel>();
        _number_Label         = _info_Container.Find("number_Label").GetComponent <UILabel>();
        _number_Label.color   = UICommon.FONT_COLOR_GREY;
        _value_Label          = _info_Container.Find("number_Label/value_Label").GetComponent <UILabel>();
        _value_Label.color    = UICommon.FONT_COLOR_GREEN;
        _describe_Label       = _info_Container.Find("describe_Label").GetComponent <UILabel>();
        _describe_Label.color = UICommon.FONT_COLOR_GREY;
        _itemiconbg           = _info_Container.Find("itemiconbg").GetComponent <UISprite>();
        _itemicon             = _info_Container.Find("itemiconbg/itemicon").GetComponent <UITexture>();

        _mission_Container = _InitiativeProp_Container.Find("mission_Container");
        _arrowSprite       = _InitiativeProp_Container.Find("drop_Btn/arrow_Sprite");
        _drop_Btn          = _InitiativeProp_Container.Find("drop_Btn").GetComponent <UIButton>();
        UIHelper.AddBtnClick(_drop_Btn, OnDrop);
        _drop_Label       = _InitiativeProp_Container.Find("drop_Btn/Label").GetComponent <UILabel>();
        _drop_Label.color = UICommon.FONT_COLOR_GREY;

        _ScrollView = _mission_Container.Find("ScrollView").GetComponent <UIScrollView>();
        _Grid       = _mission_Container.Find("ScrollView/Grid").GetComponent <UIGrid>();
    }
Exemplo n.º 7
0
 void Awake()
 {
     _transform              = this.transform;
     _itmebg                 = _transform.Find("itmebg").GetComponent <UISprite>();
     _rank_Sprites           = _transform.Find("rank_Sprite").GetComponent <UISprite>();
     _headIcon               = _transform.Find("headIcon_Bg/headIcon").GetComponent <UISprite>();
     _playName_Label         = _transform.Find("playName_Label").GetComponent <UILabel>();
     _playName_Label.color   = UICommon.FONT_COLOR_GREY;
     _playLevel_Label        = _transform.Find("playLevel_Label").GetComponent <UILabel>();
     _playLevel_Label.color  = UICommon.FONT_COLOR_GREY;
     _rank_Label             = _transform.Find("rank_Label").GetComponent <UILabel>();
     _rank_Label.color       = UICommon.FONT_COLOR_GREY;
     _rankValue_Label        = _transform.Find("rank_Label/Label").GetComponent <UILabel>();
     _rankValue_Label.color  = UICommon.FONT_COLOR_GREEN;
     _fight_Label            = _transform.Find("fight_Label").GetComponent <UILabel>();
     _fight_Label.color      = UICommon.FONT_COLOR_GREY;
     _fightValue_Label       = _transform.Find("fight_Label/Label").GetComponent <UILabel>();
     _fightValue_Label.color = UICommon.FONT_COLOR_ORANGE;
     _challenge_btn          = _transform.Find("challenge_btn").GetComponent <UIButton>();
     UIHelper.AddBtnClick(_challenge_btn, OnChallenge);
     _challenge_Label       = _transform.Find("challenge_btn/Label").GetComponent <UILabel>();
     _challenge_Label.color = UICommon.FONT_COLOR_GOLDEN;
     _headIcon_btn          = _transform.Find("headIcon_Bg/headIcon").GetComponent <UIButton>();
     UIHelper.AddBtnClick(_headIcon_btn, OnHeadIcon);
 }
Exemplo n.º 8
0
    void Awake()
    {
        _Container        = this.transform;
        _iconBg           = _Container.Find("iconBg").GetComponent <UISprite>();
        _formation_sprite = _Container.Find("formation_sprite").GetComponent <UISprite>();
        _rank_sprite      = _Container.Find("rank_sprite").GetComponent <UISprite>();
        _type_Sprite      = _Container.Find("type_Sprite").GetComponent <UISprite>();
        _icon_Texture     = _Container.Find("iicon_Texture").GetComponent <UITexture>();
        _icon_Btn         = _Container.Find("iicon_Texture").GetComponent <UIButton>();
        UIHelper.AddBtnClick(_icon_Btn, OnIcon);
        _heroLevel_Label       = _Container.Find("heroLevel_Label").GetComponent <UILabel>();
        _heroLevel_Label.color = UICommon.FONT_COLOR_GREY;

        _manager_Btn            = _Container.Find("manager_Btn").GetComponent <UIButton>();
        _manager_label          = _Container.Find("manager_Btn/Label").GetComponent <UILabel>();
        _obtain_Btn             = _Container.Find("obtain_Btn").GetComponent <UIButton>();
        _obtain_label           = _Container.Find("obtain_Btn/Label").GetComponent <UILabel>();
        _recruiting_Btn         = _Container.Find("recruiting_Btn").GetComponent <UIButton>();
        _recruiting_label       = _Container.Find("recruiting_Btn/Label").GetComponent <UILabel>();
        _value_Label            = _Container.Find("recruiting_Btn/value_Label").GetComponent <UILabel>();
        _item_Sprite            = _Container.Find("recruiting_Btn/item_Sprite").GetComponent <UISprite>();
        _heroName_Label         = _Container.Find("heroName_Label").GetComponent <UILabel>();
        _manager_label.color    = UICommon.FONT_COLOR_GOLDEN;
        _obtain_label.color     = UICommon.FONT_COLOR_GOLDEN;
        _recruiting_label.color = UICommon.FONT_COLOR_GOLDEN;
        _value_Label.color      = UICommon.FONT_COLOR_ORANGE;
        UIHelper.AddBtnClick(_manager_Btn, OnManager);
        UIHelper.AddBtnClick(_obtain_Btn, OnObtain);
        UIHelper.AddBtnClick(_recruiting_Btn, OnRecruiting);
    }
Exemplo n.º 9
0
    void InitUI()
    {
        _panelContainer = transform.Find("HeroUpLevel_Container");
        _closeBtn       = _panelContainer.Find("CloseBtn").GetComponent <UIButton>();
        UIHelper.AddBtnClick(_closeBtn, OnClose);
        _panelName       = _panelContainer.Find("panelName_Label").GetComponent <UILabel>();
        _panelName.color = UICommon.FONT_COLOR_GREY;

        _Container             = _panelContainer.Find("heroInfo_Item");
        _iconBg                = _Container.Find("iconBg").GetComponent <UISprite>();
        _formation_sprite      = _Container.Find("formation_sprite").GetComponent <UISprite>();
        _rank_sprite           = _Container.Find("rank_sprite").GetComponent <UISprite>();
        _type_Sprite           = _Container.Find("type_Sprite").GetComponent <UISprite>();
        _icon_Texture          = _Container.Find("iicon_Texture").GetComponent <UITexture>();
        _heroLevel_Label       = _Container.Find("heroLevel_Label").GetComponent <UILabel>();
        _heroLevel_Label.color = UICommon.FONT_COLOR_GREY;
        _Timer_Colored_Slider  = _panelContainer.Find("Timer_Colored_Slider").GetComponent <UISlider>();
        _expLabel              = _panelContainer.Find("Timer_Colored_Slider/Label").GetComponent <UILabel>();
        _expLabel.color        = UICommon.FONT_COLOR_ORANGE;
        _Grid           = _panelContainer.Find("heroInfo_Container/Grid").GetComponent <UIGrid>();
        _heroName_Label = _Container.Find("heroName_Label").GetComponent <UILabel>();

        // 提升panel renderqueue
//		UIPanel panel = gameObject.GetComponent<UIPanel> ();
//		UIHelper.IncreasePanelRender (panel);
    }
Exemplo n.º 10
0
    void Awake()
    {
        _parent                 = this.transform;
        _from_Label             = _parent.Find("from_Label").GetComponent <UILabel>();
        _from_Label.color       = UICommon.FONT_COLOR_ORANGE;
        _fromName_Label         = _parent.Find("fromName_Label").GetComponent <UILabel>();
        _fromName_Label.color   = UICommon.FONT_COLOR_ORANGE;
        _title_Label            = _parent.Find("title_Label").GetComponent <UILabel>();
        _title_Label.color      = UICommon.FONT_COLOR_GREY;
        _titleValue_Label       = _parent.Find("titleValue_Label").GetComponent <UILabel>();
        _titleValue_Label.color = UICommon.FONT_COLOR_GREY;

        _btn = _parent.Find("bg_btn").GetComponent <UIButton>();
        UIHelper.AddBtnClick(_btn, OnSeleted);
        _bg_btn = _parent.Find("bg_btn").GetComponent <UIToggle>();
//		EventDelegate.Add(_bg_btn.onChange,OnToggle);
        _validity_Label = _parent.Find("validity_Label").GetComponent <UILabel>();
        _validity_Label.gameObject.SetActive(false);
        _validityValue_Label = _parent.Find("validity_Label/Label").GetComponent <UILabel>();
        _date_Label          = _parent.Find("date_Label").GetComponent <UILabel>();
        _date_Label.color    = UICommon.FONT_COLOR_GREEN;
        _icon              = _parent.Find("icon").GetComponent <UISprite>();
        _iconLine          = _parent.Find("line").GetComponent <UISprite>();
        _attachment_Sprite = _parent.Find("attachment_Sprite").GetComponent <UISprite>();
    }
Exemplo n.º 11
0
    void Awake()
    {
        _AddStrengthBtn    = transform.Find("playerInfoContainer/AddStrengthBtn").GetComponent <UIButton>();
        _AddStrength_Label = transform.Find("playerInfoContainer/AddStrengthBtn/AddStrength_Label").GetComponent <UILabel>();

        _AddFoodBtn    = transform.Find("playerInfoContainer/AddFoodBtn").GetComponent <UIButton>();
        _AddFood_Label = transform.Find("playerInfoContainer/AddFoodBtn/AddFood_Label").GetComponent <UILabel>();

        _AddOilBtn       = transform.Find("playerInfoContainer/AddOilBtn").GetComponent <UIButton>();
        _AddOilBtn_Label = transform.Find("playerInfoContainer/AddOilBtn/AddOilBtn_Label").GetComponent <UILabel>();

        _AddMetalBtn       = transform.Find("playerInfoContainer/AddMetalBtn").GetComponent <UIButton>();
        _AddMetalBtn_Label = transform.Find("playerInfoContainer/AddMetalBtn/AddMetalBtn_Label").GetComponent <UILabel>();

        _AddRareBtn    = transform.Find("playerInfoContainer/AddRareBtn").GetComponent <UIButton>();
        _AddRare_Label = transform.Find("playerInfoContainer/AddRareBtn/AddRare_Label").GetComponent <UILabel>();

        _AddCashBtn    = transform.Find("playerInfoContainer/AddCashBtn").GetComponent <UIButton>();
        _AddCash_Label = transform.Find("playerInfoContainer/AddCashBtn/AddCash_Label").GetComponent <UILabel>();


        EventDelegate evFood = new EventDelegate(OnClickAddFood);

        _AddFoodBtn.onClick.Add(evFood);

        EventDelegate evOil = new EventDelegate(OnClickAddOil);

        _AddOilBtn.onClick.Add(evOil);


        EventDelegate evStrength = new EventDelegate(OnClickAddStreng);

        _AddStrengthBtn.onClick.Add(evStrength);

        EventDelegate evMare = new EventDelegate(OnClickAddMeta);

        _AddMetalBtn.onClick.Add(evMare);

        EventDelegate evCash = new EventDelegate(OnClickAddCash);

        _AddCashBtn.onClick.Add(evCash);

        EventDelegate evRare = new EventDelegate(OnClickAddRare);

        _AddRareBtn.onClick.Add(evRare);


        UIButton btn_campaign = UIHelper.FindChildInObject(gameObject, "Btn_Battle").GetComponent <UIButton>();

        UIHelper.AddBtnClick(btn_campaign, OnClickCampaign);
        _PVPBtn = UIHelper.FindChildInObject(gameObject, "Btn_world").GetComponent <UIButton>();
        UIHelper.AddBtnClick(_PVPBtn, OnPVP);
        _mian_Panel        = transform.Find("playerInfoContainer");
        _PlayerName_Label  = _mian_Panel.Find("PlayerName_bg/PlayerName_Label").GetComponent <UILabel>();
        _Fighting_Label    = _mian_Panel.Find("Fighting_bg/Fighting_Label").GetComponent <UILabel>();
        _PlayerLevel_Label = _mian_Panel.Find("Level_Sprite/PlayerLevel_Label").GetComponent <UILabel>();
        _PlayerVip_Label   = _mian_Panel.Find("Vip_Sprite/PlayerVip_Label").GetComponent <UILabel>();
        _head_Sprite       = _mian_Panel.Find("head_bg/head_Sprite").GetComponent <UISprite>();
    }
Exemplo n.º 12
0
    void Awake()
    {
        _heroSprite = transform.Find("Hero_Body_Sprite").GetComponent <UISprite> ();
        _nameLabel  = transform.Find("Name_Label").GetComponent <UILabel> ();
        _dutySprite = transform.Find("Hero_Body_Sprite/Duty_Sprite").GetComponent <UISprite> ();

        UIHelper.AddBtnClick(GetComponent <UIButton> (), HeroDetialPanelCB);
    }
Exemplo n.º 13
0
    void Awake()
    {
        _panelContainer = transform.Find("Hero_Container");
        _closeBtn       = _panelContainer.Find("CloseBtn").GetComponent <UIButton>();
        UIHelper.AddBtnClick(_closeBtn, OnClose);
        _panelName          = _panelContainer.Find("panelName_Label").GetComponent <UILabel>();
        _panelName.color    = UICommon.FONT_COLOR_GREY;
        _Checkbox_Container = _panelContainer.Find("Checkbox_Container");
        _Checkbox_1         = _Checkbox_Container.Find("Checkbox_1").GetComponent <UIToggle>();
        _Checkbox_Label_1   = _Checkbox_Container.Find("Checkbox_1/Label").GetComponent <UILabel>();
        _Checkbox_2         = _Checkbox_Container.Find("Checkbox_2").GetComponent <UIToggle>();
        _Checkbox_Label_2   = _Checkbox_Container.Find("Checkbox_2/Label").GetComponent <UILabel>();
        _Checkbox_3         = _Checkbox_Container.Find("Checkbox_3").GetComponent <UIToggle>();
        _Checkbox_Label_3   = _Checkbox_Container.Find("Checkbox_3/Label").GetComponent <UILabel>();
        _Checkbox_4         = _Checkbox_Container.Find("Checkbox_4").GetComponent <UIToggle>();
        _Checkbox_Label_4   = _Checkbox_Container.Find("Checkbox_4/Label").GetComponent <UILabel>();
        _Checkbox_5         = _Checkbox_Container.Find("Checkbox_5").GetComponent <UIToggle>();
        _Checkbox_Label_5   = _Checkbox_Container.Find("Checkbox_5/Label").GetComponent <UILabel>();
        EventDelegate.Add(_Checkbox_1.onChange, CheckboxOnChange_1);
        EventDelegate.Add(_Checkbox_2.onChange, CheckboxOnChange_2);
        EventDelegate.Add(_Checkbox_3.onChange, CheckboxOnChange_3);
        EventDelegate.Add(_Checkbox_4.onChange, CheckboxOnChange_4);
        EventDelegate.Add(_Checkbox_5.onChange, CheckboxOnChange_5);
        _unitTypeList.Clear();
        _unitTypeList.Add(_Checkbox_Label_1);
        _unitTypeList.Add(_Checkbox_Label_2);
        _unitTypeList.Add(_Checkbox_Label_3);
        _unitTypeList.Add(_Checkbox_Label_4);
        _unitTypeList.Add(_Checkbox_Label_5);
        foreach (UILabel label in _unitTypeList)
        {
            label.color = UICommon.FONT_COLOR_GREY;
        }
        _Checkbox_color_1       = _Checkbox_Container.Find("Checkbox_color_1").GetComponent <UIToggle>();
        _Checkbox_color_Label_1 = _Checkbox_Container.Find("Checkbox_color_1/Label").GetComponent <UILabel>();
        _Checkbox_color_2       = _Checkbox_Container.Find("Checkbox_color_2").GetComponent <UIToggle>();
        _Checkbox_color_Label_2 = _Checkbox_Container.Find("Checkbox_color_2/Label").GetComponent <UILabel>();
        _Checkbox_color_3       = _Checkbox_Container.Find("Checkbox_color_3").GetComponent <UIToggle>();
        _Checkbox_color_Label_3 = _Checkbox_Container.Find("Checkbox_color_3/Label").GetComponent <UILabel>();
        _Checkbox_color_4       = _Checkbox_Container.Find("Checkbox_color_4").GetComponent <UIToggle>();
        _Checkbox_color_Label_4 = _Checkbox_Container.Find("Checkbox_color_4/Label").GetComponent <UILabel>();
        _Checkbox_color_5       = _Checkbox_Container.Find("Checkbox_color_5").GetComponent <UIToggle>();
        _Checkbox_color_Label_5 = _Checkbox_Container.Find("Checkbox_color_5/Label").GetComponent <UILabel>();
        EventDelegate.Add(_Checkbox_color_1.onChange, CheckboxColorOnChange_1);
        EventDelegate.Add(_Checkbox_color_2.onChange, CheckboxColorOnChange_2);
        EventDelegate.Add(_Checkbox_color_3.onChange, CheckboxColorOnChange_3);
        EventDelegate.Add(_Checkbox_color_4.onChange, CheckboxColorOnChange_4);
        EventDelegate.Add(_Checkbox_color_5.onChange, CheckboxColorOnChange_5);
        _Checkbox_color_Label_1.color = UICommon.UNIT_NAME_COLOR_0;
        _Checkbox_color_Label_2.color = UICommon.UNIT_NAME_COLOR_1;
        _Checkbox_color_Label_3.color = UICommon.UNIT_NAME_COLOR_2;
        _Checkbox_color_Label_4.color = UICommon.UNIT_NAME_COLOR_3;
        _Checkbox_color_Label_5.color = UICommon.UNIT_NAME_COLOR_4;

        _scrollview = _panelContainer.Find("heroList_Container/Scroll View").GetComponent <UIScrollView>();
        _grid       = _panelContainer.Find("heroList_Container/Scroll View/Grid").GetComponent <UIGrid>();
    }
Exemplo n.º 14
0
 void Awake()
 {
     _iswin_Label    = transform.Find("iswin_Label").GetComponent <UILabel>();
     _info_Label     = transform.Find("info_Label").GetComponent <UILabel>();
     _btnLabel       = transform.Find("view_Btn/Label").GetComponent <UILabel>();
     _btnLabel.color = UICommon.FONT_COLOR_GOLDEN;
     _view_Btn       = transform.Find("view_Btn").GetComponent <UIButton>();
     UIHelper.AddBtnClick(_view_Btn, ONView);
 }
Exemplo n.º 15
0
    void Awake()
    {
        _TankNameLabel      = transform.Find("TankNameLabel").GetComponent <UILabel>();
        _iconBg             = transform.Find("tankbg").GetComponent <UISprite>();
        _icon               = _iconBg.gameObject.transform.Find("TankIcon").GetComponent <UITexture>();
        _iconBtn            = _iconBg.gameObject.transform.Find("TankIcon").GetComponent <UIButton>();
        _format_Sprite      = _iconBg.gameObject.transform.Find("format_Sprite").GetComponent <UISprite>();
        _canResearch_Sprite = _iconBg.gameObject.transform.Find("canResearch_Sprite").GetComponent <UISprite>();

        EventDelegate evicon = new EventDelegate(OnGoToDetail);

        _iconBtn.onClick.Add(evicon);
        _lock_Container       = transform.Find("lock_Container");
        _needPaperValue_Label = _lock_Container.Find("needPaper_Label/needPaperValue_Label").GetComponent <UILabel>();
        _currentValue_Label   = _lock_Container.Find("current_Label/currentValue_Label").GetComponent <UILabel>();

        _redPoint_Sprite  = _lock_Container.Find("researchBtn/redPoint_Sprite").GetComponent <UISprite>();
        _researchBtn      = _lock_Container.Find("researchBtn").GetComponent <UIButton>();
        _toObtainBtn      = _lock_Container.Find("toObtainBtn").GetComponent <UIButton>();
        _researchRedPoint = _researchBtn.gameObject.transform.Find("redPoint_Sprite").GetComponent <UISprite>();
        EventDelegate evresear = new EventDelegate(OnResearch);

        _researchBtn.onClick.Add(evresear);
        EventDelegate evtoba = new EventDelegate(OnToObtain);

        _toObtainBtn.onClick.Add(evtoba);


        _unlock_Container      = transform.Find("unlock_Container");
        _speed_Container       = _unlock_Container.Find("speed_Container");
        _currentInventoryLabel = _unlock_Container.Find("currentInventoryLabel/currentValueLabel").GetComponent <UILabel>();
        _repairIngLabel        = _unlock_Container.Find("currentMaintenanceLabel/currentValueLabel").GetComponent <UILabel>();
        _currentDamageLabel    = _unlock_Container.Find("currentDamageLabel/currentValueLabel").GetComponent <UILabel>();
        _productBtn            = _unlock_Container.Find("productBtn").GetComponent <UIButton>();
        _repairBtn             = _unlock_Container.Find("repairBtn").GetComponent <UIButton>();
        _product_redPoint      = _unlock_Container.Find("productBtn/redPoint_Sprite").GetComponent <UISprite>();
        _repair_redPoint       = _unlock_Container.Find("repairBtn/redPoint_Sprite").GetComponent <UISprite>();
        _repair_redPoint.gameObject.SetActive(false);

        EventDelegate evpro = new EventDelegate(OnProduct);

        _productBtn.onClick.Add(evpro);
        EventDelegate evrep = new EventDelegate(OnRepair);

        _repairBtn.onClick.Add(evrep);

        _harvestBtn = _unlock_Container.Find("harvestBtn").GetComponent <UIButton>();
        UIHelper.AddBtnClick(_harvestBtn, OnHarvest);
        _Timer_Colored_Slider = _unlock_Container.Find("speed_Container/Timer_Colored_Slider").GetComponent <UISlider>();
        _timeLabel            = _unlock_Container.Find("speed_Container/Timer_Colored_Slider/Label").GetComponent <UILabel>();
        _speedBtn             = _unlock_Container.Find("speed_Container/speedBtn").GetComponent <UIButton>();
        EventDelegate evspe = new EventDelegate(OnSpeed);

        _speedBtn.onClick.Add(evspe);
        _speedCoinLabel = _unlock_Container.Find("speed_Container/speedBtn/speedCoinLabel").GetComponent <UILabel>();
    }
Exemplo n.º 16
0
 void Awake()
 {
     _Container = transform.Find("ReportContainer");
     _close_Btn = _Container.Find("close_Btn").GetComponent <UIButton>();
     UIHelper.AddBtnClick(_close_Btn, OnClose);
     _namePanel       = _Container.Find("panelName_Label").GetComponent <UILabel>();
     _namePanel.color = UICommon.FONT_COLOR_GREY;
     _Grid            = _Container.Find("infoContainer/ScrollView/Grid").GetComponent <UIGrid>();
     _scrollview      = _Container.Find("infoContainer/ScrollView").GetComponent <UIScrollView>();
 }
Exemplo n.º 17
0
    public override void Init()
    {
        base.Init();

        scrollview = UIHelper.FindChildInObject(this.gameObject, "Scroll_View").GetComponent <UIScrollView> ();
        grid       = UIHelper.FindChildInObject(this.gameObject, "Grid").GetComponent <UIGrid> ();


        UIHelper.AddBtnClick(this.gameObject, "Closed_Btn", OnClosed);
    }
Exemplo n.º 18
0
    public override void Init()
    {
        base.Init();

        _confirm_btn  = UIHelper.FindChildInObject(gameObject, "cofirm_btn").GetComponent <UIButton>();
        _bg_btn       = UIHelper.FindChildInObject(gameObject, "bg_btn").GetComponent <UIButton>();
        _message_text = UIHelper.FindChildInObject(gameObject, "message_text").GetComponent <UILabel>();

        UIHelper.AddBtnClick(_confirm_btn, ConfirmBtnCallBack);
        UIHelper.AddBtnClick(_bg_btn, BgBtnCallBack);
    }
Exemplo n.º 19
0
 void Awake()
 {
     _panelContainer = transform.Find("SevenDaysLoginContainer");
     _closeBtn       = _panelContainer.Find("close_Btn").GetComponent <UIButton>();
     UIHelper.AddBtnClick(_closeBtn, OnClose);
     _panelName       = _panelContainer.Find("panelName_Label").GetComponent <UILabel>();
     _panelName.color = UICommon.FONT_COLOR_GREY;
     _ScrollView      = _panelContainer.Find("ScrollView").GetComponent <UIScrollView>();
     _Grid            = _panelContainer.Find("ScrollView/Grid").GetComponent <UIGrid>();
     CreateItem(_Grid, 7);
 }
Exemplo n.º 20
0
 void Awake()
 {
     _iconbg                  = transform.Find("headIconbg").GetComponent <UISprite>();
     _icon                    = transform.Find("headIconbg/Sprite").GetComponent <UISprite>();
     _missionName_Label       = transform.Find("missionName_Label").GetComponent <UILabel>();
     _mission_Label           = transform.Find("mission_Label").GetComponent <UILabel>();
     _missionName_Label.color = UICommon.FONT_COLOR_GREY;
     _mission_Label.color     = UICommon.FONT_COLOR_GREY;
     _gotoBtn                 = transform.Find("gotoBtn").GetComponent <UIButton>();
     UIHelper.AddBtnClick(_gotoBtn, OnGOTO);
     _goLabel       = transform.Find("gotoBtn/Label").GetComponent <UILabel>();
     _goLabel.color = UICommon.FONT_COLOR_GOLDEN;
 }
Exemplo n.º 21
0
 void Awake()
 {
     _transform    = this.transform;
     _name         = _transform.Find("name").GetComponent <UILabel>();
     _iconBg       = _transform.Find("iconBg").GetComponent <UISprite>();
     _icon         = _transform.Find("iconBg/icon").GetComponent <UITexture>();
     _number       = _transform.Find("number").GetComponent <UILabel>();
     _number.color = UICommon.FONT_COLOR_GREY;
     _bug_Btn      = _transform.Find("bug_Btn").GetComponent <UIButton>();
     UIHelper.AddBtnClick(_bug_Btn, OnClickBuy);
     _CashLabel       = _transform.Find("bug_Btn/Label").GetComponent <UILabel>();
     _Label_ed        = _transform.Find("bug_Btn/Label_ed").GetComponent <UILabel>();
     _CashLabel.color = UICommon.FONT_COLOR_ORANGE;
 }
Exemplo n.º 22
0
    void Awake()
    {
        _panelContainer = transform.Find("SignInContainer");
        _closeBtn       = _panelContainer.Find("close_Btn").GetComponent <UIButton>();
        UIHelper.AddBtnClick(_closeBtn, OnClose);
        _panelName       = _panelContainer.Find("panelName_Label").GetComponent <UILabel>();
        _panelName.color = UICommon.FONT_COLOR_GREY;
        _30Grid          = _panelContainer.Find("30_Container/Grid").GetComponent <UIGrid>();
        _4Grid           = _panelContainer.Find("reward_Container/Grid").GetComponent <UIGrid>();
        DateTime dtNow = DateTime.Now;

        _days = DateTime.DaysInMonth(dtNow.Year, dtNow.Month);
        CreateItem(_30Grid, _days, SignInItem.SignInItemType.SIGININ);
        CreateItem(_4Grid, 4, SignInItem.SignInItemType.CUMULATIVE);
    }
    void Awake()
    {
        scrollViewItemUI = transform.Find("formation_unit_scrollview").gameObject;

        name_Label  = scrollViewItemUI.transform.Find("name_Label").GetComponent <UILabel>();
        count_Label = scrollViewItemUI.transform.Find("count_Label").GetComponent <UILabel>();
        unit_Sprite = scrollViewItemUI.transform.Find("unit_Sprite").GetComponent <UISprite>();

        battle_Sprite = scrollViewItemUI.transform.Find("battle_Sprite").GetComponent <UISprite>();
        bg_Sprite     = scrollViewItemUI.transform.Find("bg_Sprite").GetComponent <UISprite>();

        model_Formation = InstancePlayer.instance.model_User.model_Formation;

        UIHelper.AddBtnClick(GetComponent <UIButton> (), UnitDetialPanelCB);
    }
Exemplo n.º 24
0
    void Awake()
    {
        _attribute_Container = this.transform;
        _expBg   = _attribute_Container.Find("skill_bg").GetComponent <UISprite>();
        _expIcon = _attribute_Container.Find("skill_bg/skillIcon").GetComponent <UITexture>();

        _expName                  = _attribute_Container.Find("skillName_Label").GetComponent <UILabel>();
        _expName.color            = UICommon.FONT_COLOR_ORANGE;
        _expAttribute_Label       = _attribute_Container.Find("skillAttribute_Label").GetComponent <UILabel>();
        _expAttribute_Label.color = UICommon.FONT_COLOR_GREY;
        _numberLabel              = _attribute_Container.Find("attribute_Label_1").GetComponent <UILabel>();
        _numberLabel.color        = UICommon.FONT_COLOR_GREY;
        _valueLabel               = _attribute_Container.Find("attribute_Label_1/Label").GetComponent <UILabel>();
        _valueLabel.color         = UICommon.FONT_COLOR_GREEN;
        _use_Btn                  = _attribute_Container.Find("use_Btn").GetComponent <UIButton>();
        _useLabel                 = _use_Btn.gameObject.transform.Find("Label").GetComponent <UILabel>();
        _useLabel.color           = UICommon.FONT_COLOR_GOLDEN;
        UIHelper.AddBtnClick(_use_Btn, OnUse);
    }
Exemplo n.º 25
0
    public override void Init()
    {
        base.Init();
        animationType = PanelBase.AnimationType.ALPHA;

        GameObject Bottom_Container = UIHelper.FindChildInObject(gameObject, "Bottom_Container");

        UIHelper.AddBtnClick(Bottom_Container, "Btn_Formation", OnFormation);
        UIHelper.AddBtnClick(Bottom_Container, "Btn_Battle", OnBattle);
        UIHelper.AddBtnClick(Bottom_Container, "Btn_Clear", OnBattleClear);

        GameObject Top_Container = UIHelper.FindChildInObject(gameObject, "Top_Sprite");

        UIHelper.AddBtnClick(Top_Container, "Btn_Closed", OnClosed);

        missionDetialUI = gameObject.GetComponent <MissionDetialUI> ();

        grid_Mission = UIHelper.FindChildInObject(gameObject, "Grid_Mission").GetComponent <UIGrid> ();
    }
Exemplo n.º 26
0
    public override void Init()
    {
        base.Init();

        // 关闭
        UIButton closedBtn = UIHelper.FindChildInObject(this.gameObject, "Bg").GetComponent <UIButton> ();

        UIHelper.AddBtnClick(closedBtn, OnClosed);

        //  扫荡1次
        UIButton BtnOne = UIHelper.FindChildInObject(this.gameObject, "Btn_One").GetComponent <UIButton> ();

        UIHelper.AddBtnClick(BtnOne, MissionClearOne);
        // 扫荡10次
        UIButton BtnTen = UIHelper.FindChildInObject(this.gameObject, "Btn_Ten").GetComponent <UIButton> ();

        UIHelper.AddBtnClick(BtnTen, MissionClearTen);

        _Left_Label = UIHelper.FindChildInObject(this.gameObject, "Left_Label").GetComponent <UILabel> ();
    }
Exemplo n.º 27
0
    void Awake()
    {
        _parent   = transform.Find("VipContainer");
        _closeBtn = _parent.Find("close_Btn").GetComponent <UIButton>();
        UIHelper.AddBtnClick(_closeBtn, OnClose);
        _vipExp_Container = _parent.Find("vipExp_Container");
        _Vipbtn_Container = _parent.Find("Vipbtn_Container");
        _info_Container   = _parent.Find("info_Container");

        _Timer_Colored_Slider  = _vipExp_Container.Find("Timer_Colored_Slider").GetComponent <UISlider>();
        _expValueLabel         = _vipExp_Container.Find("Timer_Colored_Slider/Label").GetComponent <UILabel>();
        _expValueLabel.color   = UICommon.FONT_COLOR_ORANGE;
        _curren_Label          = _vipExp_Container.Find("curren_Label").GetComponent <UILabel>();
        _curren_Label.color    = UICommon.FONT_COLOR_GREY;
        _will_Label            = _vipExp_Container.Find("will_Label").GetComponent <UILabel>();
        _will_Label.color      = UICommon.FONT_COLOR_GREY;
        _needVipExpLabel       = _vipExp_Container.Find("Label").GetComponent <UILabel>();
        _needVipExpLabel.color = UICommon.FONT_COLOR_GREY;

        _btnGrid = _Vipbtn_Container.Find("Grid").GetComponent <UIGrid>();
    }
Exemplo n.º 28
0
    void Awake()
    {
        _Warehouse_Container = transform.Find("Warehouse_Container");
        _closeBtn            = _Warehouse_Container.Find("CloseBtn").GetComponent <UIButton>();
        UIHelper.AddBtnClick(_closeBtn, OnClose);
        _btn_Container = _Warehouse_Container.Find("btn_Container");

        _all_Btn          = _btn_Container.Find("all_Btn").GetComponent <UIButton>();
        _boxs_Btn         = _btn_Container.Find("boxs_Btn").GetComponent <UIButton>();
        _resources_Btn    = _btn_Container.Find("resources_Btn").GetComponent <UIButton>();
        _all_toggle       = _btn_Container.Find("all_Btn").GetComponent <UIToggle>();
        _boxs_toggle      = _btn_Container.Find("boxs_Btn").GetComponent <UIToggle>();
        _resources_toggle = _btn_Container.Find("resources_Btn").GetComponent <UIToggle>();
        EventDelegate.Add(_all_toggle.onChange, OnAllChange);
        EventDelegate.Add(_boxs_toggle.onChange, OnConsumeChange);
        EventDelegate.Add(_resources_toggle.onChange, OnNormalChange);
        _items_Container = _Warehouse_Container.Find("items_Container");

        _all_ScrollView       = _items_Container.Find("all_Container/Scroll View").GetComponent <UIScrollView>();
        _boxs_ScrollView      = _items_Container.Find("boxs_Container/Scroll View").GetComponent <UIScrollView>();
        _resources_ScrollView = _items_Container.Find("resources_Container/Scroll View").GetComponent <UIScrollView>();
        _all_grid             = _items_Container.Find("all_Container/Scroll View/Grid").GetComponent <UIGrid>();
        _boxs_grid            = _items_Container.Find("boxs_Container/Scroll View/Grid").GetComponent <UIGrid>();
        _resources_grid       = _items_Container.Find("resources_Container/Scroll View/Grid").GetComponent <UIGrid>();

        _warehouseLable = _Warehouse_Container.Find("warehouse_Label").GetComponent <UILabel>();
        _allLable       = _btn_Container.Find("all_Btn/all_Label").GetComponent <UILabel>();
        _boxsLable      = _btn_Container.Find("boxs_Btn/boxs_Label").GetComponent <UILabel>();
        _resourceLable  = _btn_Container.Find("resources_Btn/res_Label").GetComponent <UILabel>();
        _labelList.Clear();
        _labelList.Add(_warehouseLable);
        _labelList.Add(_allLable);
        _labelList.Add(_boxsLable);
        _labelList.Add(_resourceLable);
        foreach (UILabel label in _labelList)
        {
            label.color = UICommon.FONT_COLOR_GREY;
        }
    }
Exemplo n.º 29
0
 void Awake()
 {
     _parent                 = this.transform;
     _from_Label             = _parent.Find("from_Label").GetComponent <UILabel>();
     _from_Label.color       = UICommon.FONT_COLOR_ORANGE;
     _fromName_Label         = _parent.Find("fromName_Label").GetComponent <UILabel>();
     _fromName_Label.color   = UICommon.FONT_COLOR_ORANGE;
     _title_Label            = _parent.Find("title_Label").GetComponent <UILabel>();
     _title_Label.color      = UICommon.FONT_COLOR_GREY;
     _titleValue_Label       = _parent.Find("titleValue_Label").GetComponent <UILabel>();
     _titleValue_Label.color = UICommon.FONT_COLOR_GREY;
     _playName_Label         = _parent.Find("playName_Label").GetComponent <UILabel>();
     _info_Label             = _parent.Find("info_Label").GetComponent <UILabel>();
     _delete_Btn             = _parent.Find("delete_Btn").GetComponent <UIButton>();
     UIHelper.AddBtnClick(_delete_Btn, OnClickDeleteMail);
     _get_Btn = _parent.Find("get_Btn").GetComponent <UIButton>();
     UIHelper.AddBtnClick(_get_Btn, OnGet);
     _delete_Label       = _parent.Find("delete_Btn/Label").GetComponent <UILabel>();
     _get_Label          = _parent.Find("get_Btn/Label").GetComponent <UILabel>();
     _delete_Label.color = UICommon.FONT_COLOR_GOLDEN;
     _get_Label.color    = UICommon.FONT_COLOR_GOLDEN;
     _Grid = _parent.Find("Grid").GetComponent <UIGrid>();
 }
Exemplo n.º 30
0
 void Awake()
 {
     _info_Container       = this.transform;
     _itemName             = _info_Container.Find("name_Label").GetComponent <UILabel>();
     _number_Label         = _info_Container.Find("number_Label").GetComponent <UILabel>();
     _number_Label.color   = UICommon.FONT_COLOR_GREY;
     _value_Label          = _info_Container.Find("number_Label/value_Label").GetComponent <UILabel>();
     _value_Label.color    = UICommon.FONT_COLOR_GREEN;
     _describe_Label       = _info_Container.Find("describe_Label").GetComponent <UILabel>();
     _describe_Label.color = UICommon.FONT_COLOR_GREY;
     _itemiconbg           = transform.Find("itemiconbg").GetComponent <UISprite>();
     _itemicon             = transform.Find("itemiconbg/itemicon").GetComponent <UITexture>();
     _iconBtn = transform.Find("itemiconbg/itemicon").GetComponent <UIButton>();
     UIHelper.AddBtnClick(_iconBtn, OnItemInfo);
     _use_Btn             = transform.Find("use_Btn").GetComponent <UIButton>();
     _batchUse_Btn        = transform.Find("batchUse_Btn").GetComponent <UIButton>();
     _useLabel            = _use_Btn.gameObject.transform.Find("Label").GetComponent <UILabel>();
     _batchUseLabel       = _batchUse_Btn.gameObject.transform.Find("Label").GetComponent <UILabel>();
     _useLabel.color      = UICommon.FONT_COLOR_GOLDEN;
     _batchUseLabel.color = UICommon.FONT_COLOR_GOLDEN;
     UIHelper.AddBtnClick(_use_Btn, OnUse);
     UIHelper.AddBtnClick(_batchUse_Btn, OnBatchUse);
 }