コード例 #1
0
 protected override void OnAwake()
 {
     base.OnAwake();
     name       = CacheTransform.Find("BG/label").GetComponent <UILabel>();
     readIcon   = CacheTransform.Find("ICON/Toggle/read").GetComponent <UISprite>();
     readedIcon = CacheTransform.Find("ICON/Toggle/readed").GetComponent <UISprite>();
 }
コード例 #2
0
 protected override void OnInit(Camera UICamera)
 {
     base.OnInit(UICamera);
     LeftIcon   = CacheTransform.Find("Content/LeftImage").GetComponent <Image>();
     RightIcon  = CacheTransform.Find("Content/RightImage").GetComponent <Image>();
     LeftModel  = CacheTransform.Find("Content/LeftModel");
     RightModel = CacheTransform.Find("Content/RightModel");
     ShowText   = CacheTransform.Find("Content/ShowText").GetComponent <Text>();
     TitleText  = CacheTransform.Find("Content/TitleText").GetComponent <Text>();
     for (int i = 0; i < 4; i++)
     {
         Answers[i] = CacheTransform.Find("Content/AnswerBtn" + (i + 1)).gameObject;
         EventTriggerListener.Get(Answers[i].gameObject).SetEventHandle(EnumTouchEventType.OnClick, (a, b, c) =>
         {
             StopContentText();
             string nextNode = NodeData.Answers[(int)(c[0])].Target;
             if (nextNode == "end")
             {
                 //关闭界面
                 Singleton <WindowManager> .GetInstance().CloseWindow(false, "Dialogue");
                 return;
             }
             NodeData  = GetDialogue(nextNode);
             Coroutine = SingletonMono <GameFrameWork> .GetInstance().StartCoroutine(ShowContentText());
         }, i);
     }
 }
コード例 #3
0
ファイル: UISplitGetGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     m_lab_name = CacheTransform.Find("Content/Name").GetComponent <UILabel>();
     m_lab_num  = CacheTransform.Find("Content/Num").GetComponent <UILabel>();
     InitItemInfoGrid(CacheTransform.Find("Content/InfoGridRoot/InfoGrid"));
 }
コード例 #4
0
    protected override void OnAwake()
    {
        base.OnAwake();
        m_sp_prof   = CacheTransform.Find("Content/Prof").GetComponent <UISprite>();
        m_lab_lv    = CacheTransform.Find("Content/Lv").GetComponent <UILabel>();
        m_lab_name  = CacheTransform.Find("Content/Name").GetComponent <UILabel>();
        m_lab_fight = CacheTransform.Find("Content/Fight").GetComponent <UILabel>();

        m_obj_agree = CacheTransform.Find("Content/BtnAgree").gameObject;
        if (null != m_obj_agree)
        {
            UIEventListener.Get(m_obj_agree).onClick = (obj) =>
            {
                OnDealApply(true);
            };
        }
        m_obj_refuse = CacheTransform.Find("Content/BtnRefuse").gameObject;
        if (null != m_obj_refuse)
        {
            UIEventListener.Get(m_obj_refuse).onClick = (obj) =>
            {
                OnDealApply(false);
            };
        }
    }
コード例 #5
0
ファイル: UIAwardItemGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     InitItemInfoGrid(CacheTransform.Find("Content/InfoGridRoot/InfoGrid"));
     m_ts_none   = CacheTransform.Find("Content/None");
     mtsInfoRoot = CacheTransform.Find("Content/InfoGridRoot");
 }
コード例 #6
0
    protected override void OnInit(Camera UICamera)
    {
        FirstGameObject        = CacheTransform.Find("BG/First").gameObject;
        CreatePlayerName       = CacheTransform.Find("BG/First/Board/PlayerName").GetComponent <InputField>();
        CreatePlayerInfoButton = CacheTransform.Find("BG/First/Board/Button").GetComponent <Button>();

        #region Head

        HeadTransform = CacheTransform.Find("BG/Head").transform;
        HeadImage     = HeadTransform.Find("HeadImage").GetComponent <Image>();
        RoleName      = HeadTransform.Find("RoleName").GetComponent <Text>();
        RoleLV        = HeadTransform.Find("RoleLV").GetComponent <Text>();
        EXPSlider     = HeadTransform.Find("RoleEXP").GetComponent <Slider>();
        EXPText       = HeadTransform.Find("RoleEXP/Text").GetComponent <Text>();
        CoinNumText   = HeadTransform.Find("Coinicon/Text").GetComponent <Text>();
        CoinBuyButton = HeadTransform.Find("Coinicon/AddButton").GetComponent <Button>();
        MialButton    = HeadTransform.Find("MailButton").GetComponent <Button>();
        PingText      = HeadTransform.Find("Ping/Text").GetComponent <Text>();
        FriendButton  = HeadTransform.Find("Friend").GetComponent <Button>();

        #endregion
        //ping
//        ip = Singleton<PhotonManager>.Instance.GetServerIP();
        //ip = "115.239.211.112";
    }
コード例 #7
0
    protected override void OnAwake()
    {
        base.OnAwake();

        m_lab_name      = CacheTransform.Find("Content/Title/TitleText").GetComponent <UILabel>();
        m_lab_sw        = CacheTransform.Find("Content/Get/GetSW/Value").GetComponent <UILabel>();
        m_lab_zg        = CacheTransform.Find("Content/Get/GetZG/Value").GetComponent <UILabel>();
        m_lab_zj        = CacheTransform.Find("Content/Get/GetZJ/Value").GetComponent <UILabel>();
        m_lab_leftTimes = CacheTransform.Find("Content/Bottom/LeftTimes").GetComponent <UILabel>();
        m_sp_donateIcon = CacheTransform.Find("Content/Bottom/Currency/Content/Icon").GetComponent <UISprite>();
        m_lab_donateNum = CacheTransform.Find("Content/Bottom/Currency/Content/Num").GetComponent <UILabel>();
        m_icon          = CacheTransform.Find("Content/BG/BG").GetComponent <UISprite>();
        m_obj_btnDonate = CacheTransform.Find("Content/Bottom/Donate").gameObject;
        headIcon        = CacheTransform.Find("Content/headIcon");
        if (null != m_obj_btnDonate)
        {
            UIEventListener.Get(m_obj_btnDonate).onClick = (obj) =>
            {
                if (null != donateAction && null != m_data)
                {
                    donateAction.Invoke(m_data.ID);
                }
            };
        }
        m_trans_UIItemRewardGrid = CacheTransform.Find("Content/UIItemRewardGrid");
        AddCreator(headIcon);
    }
コード例 #8
0
ファイル: UIClanHonorGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     m_lab_event = CacheTransform.Find("Content/Event").GetComponent <UILabel>();
     m_lab_name  = CacheTransform.Find("Content/Name").GetComponent <UILabel>();
     m_lab_time  = CacheTransform.Find("Content/Time").GetComponent <UILabel>();
 }
コード例 #9
0
ファイル: UIHuntingToggleGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     toggle  = CacheTransform.GetComponent <UIToggle>();
     label   = CacheTransform.Find("Label").GetComponent <UILabel>();
     warning = CacheTransform.Find("Warning").GetComponent <UISprite>();
 }
コード例 #10
0
    protected override void OnAwake()
    {
        base.OnAwake();

        m_lab_name = CacheTransform.Find("Content/FashionName").GetComponent <UILabel>();
        m_sp_bg    = CacheTransform.Find("Content/Bg").GetComponent <UISprite>();
        m_high_bg  = CacheTransform.Find("Content/hightbg").GetComponent <UISprite>();
        if (m_high_bg != null)
        {
            m_high_bg.gameObject.SetActive(false);
        }
        m_sp_icon            = CacheTransform.Find("Content/IconContent/IconBg/Icon").GetComponent <UITexture>();
        m_obj_equipMark      = CacheTransform.Find("Content/SignEquipped").gameObject;
        m_trans_priceContent = CacheTransform.Find("Content/Time/pricecontent").transform;

        if (m_trans_priceContent != null)
        {
            m_label_price = m_trans_priceContent.Find("pricelabel").GetComponent <UILabel>();
            m_sprMoney    = m_trans_priceContent.GetComponent <UISprite>();
        }
        m_label_countdown = CacheTransform.Find("Content/Time/ContDown").GetComponent <UILabel>();
        UIEventListener.Get(this.gameObject).onClick = (obj) =>
        {
            OnBtnClicked();
        };
    }
コード例 #11
0
ファイル: UIComposeNeedGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     m_ts_infoRoot  = CacheTransform.Find("Content/InfoGridRoot/InfoGrid");
     m_labBottomNum = CacheTransform.Find("Content/InfoGridRoot/BottomNum").GetComponent <UILabel>();
     InitItemInfoGrid(m_ts_infoRoot);
 }
コード例 #12
0
 protected override void OnAwake()
 {
     base.OnAwake();
     property      = CacheTransform.Find("Content/Property").GetComponent <UILabel>();
     propertyGrade = CacheTransform.Find("Content/GradeContent/Grade").GetComponent <UILabel>();
     max           = CacheTransform.Find("Content/Max");
 }
コード例 #13
0
ファイル: UIClanTaskGrid.cs プロジェクト: zuojiashun/src
    protected override void OnAwake()
    {
        base.OnAwake();
        m_lab_des = CacheTransform.Find("Content/Des").GetComponent <UIXmlRichText>();
        //m_lab_times = CacheTransform.Find("Content/Times").GetComponent<UILabel>();
        //m_reward = CacheTransform.Find("Content/RewardContent/Reward").GetComponent<UIGrid>();
        m_lab_reward  = CacheTransform.Find("Content/RewardContent/RewardTxt").GetComponent <UILabel>();
        m_obj_accept  = CacheTransform.Find("Content/Btns/BtnAccept").gameObject;
        m_typeLabel   = CacheTransform.Find("Content/IconContent/IconBg/Label").GetComponent <UILabel>();
        m_sprite_star = CacheTransform.Find("Content/star").GetComponent <UISprite>();

        m_lblCount = CacheTransform.Find("Content/Times").GetComponent <UILabel>();

        m_slider = CacheTransform.Find("Content/Times/Expslider").GetComponent <UISlider>();

        m_rewardMultiple = CacheTransform.Find("Content/IconContent/mask/Label").GetComponent <UILabel>();

        UIEventListener.Get(m_obj_accept).onClick = (obj) =>
        {
            //DataManager.Manager<ClanManger>().AcceptClanTask(questInfo.ID);
            AcceptClanTask();
        };
        m_obj_inProgress = CacheTransform.Find("Content/Btns/BtnDoing").gameObject;
        UIEventListener.Get(m_obj_inProgress).onClick = (obj) =>
        {
            //AutoMoveToTarget();
            DoClanTask();
        };
        m_obj_submit = CacheTransform.Find("Content/Btns/BtnSubmit").gameObject;
        UIEventListener.Get(m_obj_submit).onClick = (obj) =>
        {
            //DataManager.Manager<ClanManger>().FinishClanTask(questInfo.ID);
            FinishClanTask();
        };
    }
コード例 #14
0
 protected override void OnAwake()
 {
     base.OnAwake();
     m_lab_name      = CacheTransform.Find("Content/Name").GetComponent <UILabel>();
     m_checkmark     = CacheTransform.Find("Content/Toggle/Checkmark").gameObject;
     m_sp_targetMark = CacheTransform.Find("Content/TargetMark").GetComponent <UISprite>();
 }
コード例 #15
0
ファイル: UIDeliverGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     m_spriteBg   = CacheTransform.Find("Texture").GetComponent <UITexture>();
     m_lableCost  = CacheTransform.Find("Cost/Cost_label").GetComponent <UILabel>();
     m_lableName  = CacheTransform.Find("value").GetComponent <UILabel>();
     m_spriteIcon = CacheTransform.Find("Cost/Icon").GetComponent <UISprite>();
 }
コード例 #16
0
ファイル: UIShortcutAbleGrid.cs プロジェクト: zuojiashun/src
    protected override void OnAwake()
    {
        base.OnAwake();



        InitItemInfoGrid(CacheTransform.Find("Content/InfoGridRoot/InfoGrid"));
    }
コード例 #17
0
ファイル: UIGemGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     name           = CacheTransform.Find("Content/Name").GetComponent <UILabel>();
     des            = CacheTransform.Find("Content/Des").GetComponent <UILabel>();
     m_spr_redPoint = CacheTransform.Find("Content/redPoint").GetComponent <UISprite>();
     InitItemInfoGrid(CacheTransform.Find("Content/InfoGridRoot/InfoGrid"));
 }
コード例 #18
0
ファイル: UIItemGrowShowGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     mlabName = CacheTransform.Find("Content/Name").GetComponent <UILabel>();
     InitItemInfoGrid(CacheTransform.Find("Content/InfoGridRoot/InfoGrid"));
     m_ts_none   = CacheTransform.Find("Content/None");
     mtsInfoRoot = CacheTransform.Find("Content/InfoGridRoot");
 }
コード例 #19
0
ファイル: GameUI.cs プロジェクト: jscstc007/UnlimitedLand
 /// <summary>
 /// 注册UI事件
 /// </summary>
 private void RegistUI()
 {
     //主按钮
     CacheTransform.Find("Func_P/Fight_B").GetComponent <Button>().onClick.AddListener(() => { OnClick_UIType(GameUIType.Fight); });
     CacheTransform.Find("Func_P/Team_B").GetComponent <Button>().onClick.AddListener(() => { OnClick_UIType(GameUIType.Team); });
     CacheTransform.Find("Func_P/Factory_B").GetComponent <Button>().onClick.AddListener(() => { OnClick_UIType(GameUIType.Factory); });
     CacheTransform.Find("Func_P/Setting_B").GetComponent <Button>().onClick.AddListener(() => { OnClick_UIType(GameUIType.Setting); });
 }
コード例 #20
0
ファイル: UICreateRoleGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     m_spIcon       = CacheTransform.Find("Content/Icon").GetComponent <UISpriteEx>();
     m_ts           = CacheTransform.GetComponent <TweenScale>();
     m_tsSelectMask = CacheTransform.Find("Content/SelectMask");
     SetTriggerEffect(false);
 }
コード例 #21
0
 protected override void OnAwake()
 {
     base.OnAwake();
     name         = CacheTransform.Find("name").GetComponent <UILabel>();
     JinXingZhong = CacheTransform.Find("JinXingZhong").GetComponent <UILabel>();
     WeiKaiQi     = CacheTransform.Find("WeiKaiQi").GetComponent <UILabel>();
     icon         = CacheTransform.Find("icon").GetComponent <UISprite>();
 }
コード例 #22
0
ファイル: UIDailyCalendarGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     bg     = CacheTransform.Find("bg").GetComponent <UIToggle>();
     name   = CacheTransform.Find("name").GetComponent <UILabel>();
     time   = CacheTransform.Find("time").GetComponent <UILabel>();
     select = CacheTransform.Find("select").GetComponent <UISprite>();
     select.gameObject.SetActive(false);
 }
コード例 #23
0
ファイル: UIToggleGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     toggle = CacheTransform.Find("Content/Toggle").GetComponent <UIToggle>();
     toggle.instantTween = true;
     tabName             = CacheTransform.Find("Content/Toggle/Label").GetComponent <UILabel>();
     redPoint            = CacheTransform.Find("Content/RedPoint");
     SetRedPointStatus(false);
 }
コード例 #24
0
ファイル: UIActiveToggleGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     bg             = CacheTransform.Find("Bg").GetComponent <UISprite>();
     select         = CacheTransform.Find("Select").GetComponent <UISprite>();
     name           = CacheTransform.Find("Name").GetComponent <UILabel>();
     warning        = CacheTransform.Find("Warrning").GetComponent <UISprite>();
     select.enabled = false;
 }
コード例 #25
0
ファイル: UIRSInfoSelectGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     m_name = CacheTransform.Find("Content/Name").GetComponent <UILabel>();
     InitItemInfoGrid(CacheTransform.Find("Content/InfoGridRoot/InfoGrid"));
     m_toggle      = CacheTransform.Find("Content/Toggle").GetComponent <UIToggle>();
     mtsDisableBg  = CacheTransform.Find("Content/Disable");
     mtsHightlight = CacheTransform.Find("Content/Hightlight");
 }
コード例 #26
0
ファイル: UISellItemPriceGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     name  = CacheTransform.Find("name").GetComponent <UILabel>();
     price = CacheTransform.Find("Label").GetComponent <UILabel>();
     icon  = CacheTransform.Find("icon").GetComponent <Transform>();
     money = CacheTransform.Find("Label/money").GetComponent <UISprite>();
     InitItemInfoGrid(CacheTransform.Find("InfoGridRoot/InfoGrid"), false);
 }
コード例 #27
0
ファイル: UIItemUseCommonGrid.cs プロジェクト: zuojiashun/src
 protected override void OnAwake()
 {
     base.OnAwake();
     name          = CacheTransform.Find("Content/Name").GetComponent <UILabel>();
     num           = CacheTransform.Find("Content/Num").GetComponent <UILabel>();
     des           = CacheTransform.Find("Content/Des").GetComponent <UILabel>();
     icon          = CacheTransform.Find("Content/Icon").GetComponent <UITexture>();
     notEnoughMask = CacheTransform.Find("Content/NotEnoughGetMask");
 }
コード例 #28
0
    protected override void OnAwake()
    {
        base.OnAwake();
        m_lab_name = CacheTransform.Find("Content/Infos/Name").GetComponent <UILabel>();
        if (null != m_lab_name)
        {
            m_lab_name.color = ColorManager.GetColor32OfType(ColorType.White);
        }
        m_ts_infos  = CacheTransform.Find("Content/Infos");
        m_ts_none   = CacheTransform.Find("Content/None");
        m_ts_unload = CacheTransform.Find("Content/Infos/Unload");
        InitItemInfoGrid(CacheTransform.Find("Content/Infos/InfoGridRoot/InfoGrid"));
        mtsInfoRoot = CacheTransform.Find("Content/Infos/InfoGridRoot");
        if (null != m_ts_unload)
        {
            UIEventListener.Get(m_ts_unload.gameObject).onClick = (obj) =>
            {
                InvokeUIDlg(UIEventType.Click, this, true);
            };
        }
        m_ts_AttrRoot = CacheTransform.Find("Content/Infos/AttrRoot");
        if (null != m_ts_AttrRoot)
        {
            int size = 5;
            m_TransDatas = new AttrTransData[size];
            Transform     tempTs   = null;
            StringBuilder builder  = new StringBuilder();
            AttrTransData tempData = null;
            for (int i = 0; i < size; i++)
            {
                tempData = new AttrTransData();
                builder.Remove(0, builder.Length);
                builder.Append(i + 1);
                tempData.Root = m_ts_AttrRoot.Find(builder.ToString());

                builder.Remove(0, builder.Length);
                builder.Append(i + 1);
                builder.Append("/Content/Grade/Grade");
                tempTs = m_ts_AttrRoot.Find(builder.ToString());

                if (null != tempTs)
                {
                    tempData.Grade = tempTs.GetComponent <UILabel>();
                }

                builder.Remove(0, builder.Length);
                builder.Append(i + 1);
                builder.Append("/Content/Des");
                tempTs = m_ts_AttrRoot.Find(builder.ToString());
                if (null != tempTs)
                {
                    tempData.Des = tempTs.GetComponent <UILabel>();
                }
                m_TransDatas[i] = tempData;
            }
        }
    }
コード例 #29
0
 protected override void OnAwake()
 {
     base.OnAwake();
     NameLabel       = CacheTransform.Find("Content/Name").GetComponent <UILabel>();
     HeadIcon        = CacheTransform.Find("Content/HeadIcon").GetComponent <UISprite>();
     ProfessionLabel = CacheTransform.Find("Content/Profession").GetComponent <UILabel>();
     LevelLabel      = CacheTransform.Find("Content/Level").GetComponent <UILabel>();
     RechargeNum     = CacheTransform.Find("Content/RechargeNum").GetComponent <UILabel>();
 }
コード例 #30
0
 protected override void OnAwake()
 {
     base.OnAwake();
     m_spriteIcon    = CacheTransform.Find("icon").GetComponent <UITexture>();
     m_labelName     = CacheTransform.Find("name").GetComponent <UILabel>();
     m_labelLevel    = CacheTransform.Find("level").GetComponent <UILabel>();
     m_spriteBorader = CacheTransform.Find("frame").GetComponent <UISprite>();
     m_spriteSelect  = CacheTransform.Find("select").GetComponent <UISprite>();
 }