Beispiel #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>();
 }
Beispiel #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);
     }
 }
Beispiel #3
0
 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"));
 }
Beispiel #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);
            };
        }
    }
Beispiel #5
0
 protected override void OnAwake()
 {
     base.OnAwake();
     InitItemInfoGrid(CacheTransform.Find("Content/InfoGridRoot/InfoGrid"));
     m_ts_none   = CacheTransform.Find("Content/None");
     mtsInfoRoot = CacheTransform.Find("Content/InfoGridRoot");
 }
Beispiel #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";
    }
Beispiel #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);
    }
Beispiel #8
0
 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>();
 }
Beispiel #9
0
 protected override void OnAwake()
 {
     base.OnAwake();
     toggle  = CacheTransform.GetComponent <UIToggle>();
     label   = CacheTransform.Find("Label").GetComponent <UILabel>();
     warning = CacheTransform.Find("Warning").GetComponent <UISprite>();
 }
Beispiel #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();
        };
    }
Beispiel #11
0
 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);
 }
Beispiel #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");
 }
Beispiel #13
0
    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();
        };
    }
 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>();
 }
Beispiel #15
0
 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>();
 }
Beispiel #16
0
    protected override void OnAwake()
    {
        base.OnAwake();



        InitItemInfoGrid(CacheTransform.Find("Content/InfoGridRoot/InfoGrid"));
    }
Beispiel #17
0
 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"));
 }
Beispiel #18
0
 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");
 }
Beispiel #19
0
 /// <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); });
 }
Beispiel #20
0
 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);
 }
Beispiel #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>();
 }
Beispiel #22
0
 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);
 }
Beispiel #23
0
 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);
 }
Beispiel #24
0
 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;
 }
Beispiel #25
0
 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");
 }
Beispiel #26
0
 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);
 }
Beispiel #27
0
 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");
 }
    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;
            }
        }
    }
 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>();
 }
Beispiel #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>();
 }