コード例 #1
0
    public override void Init()
    {
        base.Init();
        #region 技能
        this.m_Button_SkillQ = base.GetUIObject("pn_skill/bt_skillQ") as IXUIButton;
        this.m_Button_SkillW = base.GetUIObject("pn_skill/bt_skillW") as IXUIButton;
        this.m_Button_SkillE = base.GetUIObject("pn_skill/bt_skillE") as IXUIButton;
        this.m_Button_SkillR = base.GetUIObject("pn_skill/bt_skillR") as IXUIButton;
        this.m_Button_Attack = base.GetUIObject("bt_attack") as IXUIButton;

        this.m_Sprite_SkillQ = base.GetUIObject("pn_skill/bt_skillQ/sp_skillQ") as IXUISprite;
        this.m_Sprite_SkillW = base.GetUIObject("pn_skill/bt_skillW/sp_skillW") as IXUISprite;
        this.m_Sprite_SkillE = base.GetUIObject("pn_skill/bt_skillE/sp_skillE") as IXUISprite;
        this.m_Sprite_SkillR = base.GetUIObject("pn_skill/bt_skillR/sp_skillR") as IXUISprite;
        #endregion
        #region 角色
        this.m_List_RoleList     = base.GetUIObject("pn_rolelist/gd_rolelist") as IXUIList;
        this.m_Label_RoleName    = base.GetUIObject("bt_avatar/sp_avatar_bg/lb_name") as IXUILabel;
        this.m_Sprite_AvatarIcon = base.GetUIObject("bt_avatar/sp_avatar_bg/sp_avatar") as IXUISprite;
        this.m_Label_Speed       = base.GetUIObject("pn_rolestatus/sp_speed/lb_speed") as IXUILabel;
        this.m_Label_Life        = base.GetUIObject("pn_rolestatus/sp_life/lb_life") as IXUILabel;
        #endregion
        #region 结束按钮
        this.m_Button_Finish = base.GetUIObject("bt_end") as IXUIButton;
        this.m_Label_Finish  = base.GetUIObject("bt_end/sp_background/lb_end") as IXUILabel;
        #endregion
        #region 移动按钮
        this.m_Button_Move = base.GetUIObject("bt_move") as IXUIButton;
        #endregion
    }
コード例 #2
0
 public override void Init()
 {
     base.Init();
     #region 我方的神兽列表
     this.m_ourBeastList = base.GetUIObject("Beasts/OurBeasts") as IXUIList;
     #endregion
     #region 敌方的神兽列表
     this.m_enmeyBeastList = base.GetUIObject("Beasts/EnemyBeasts") as IXUIList;
     #endregion
     #region  择神兽列表
     this.m_BeastList = base.GetUIObject("Beasts/SelectBeastBack/BeastBg/Beastlist") as IXUIList;
     #endregion
     #region 确定选择按钮
     this.m_Button_Confirm = base.GetUIObject("Beasts/SureButton") as IXUIButton;
     #endregion
     #region 提示lebel
     this.m_Label_Tips = base.GetUIObject("Beasts/RoomTip") as IXUILabel;
     #endregion
     #region 时间倒计时
     this.m_Label_Time = base.GetUIObject("Beasts/Time") as IXUILabel;
     #endregion
     #region 聊天文本
     this.m_TextList_Chat = base.GetUIObject("Beasts/ChatWindow/ChatTextList") as IXUITextList;
     #endregion
 }
コード例 #3
0
 public static void S_OnAddListItem(IXUIDlg uiDlg, IXUIList uiList, IXUIListItem uiListItem)
 {
     if (null != XUITool.Instance)
     {
         XUITool.Instance.OnAddListItem(uiDlg, uiList, uiListItem);
     }
 }
コード例 #4
0
 public void OnAddListItem(IXUIDlg uiDlg, IXUIList uiList, IXUIListItem uiListItem)
 {
     if (this.m_addListItemEventHandler != null)
     {
         this.m_addListItemEventHandler(uiDlg, uiList, uiListItem);
     }
 }
コード例 #5
0
 public override void Init()
 {
     base.Init();
     this.m_List_HeadInfo = (base.GetUIObject("list_headinfo") as IXUIList);
     if (null == this.m_List_HeadInfo)
     {
         Debug.Log("List_HeadInfo is null!");
     }
 }
コード例 #6
0
    public IXUIInput m_Input_RoleName      = null; //角色名字
    public override void Init()
    {
        base.Init();
        #region 进入游戏按钮
        this.m_Button_EnterGame = base.GetUIObject("pn_create2/bt_entergame") as IXUIButton;
        if (null == this.m_Button_EnterGame)
        {
            Debug.Log("this.ButtonEnterGame == null");
            this.m_Button_EnterGame = WidgetFactory.CreateWidget <IXUIButton>();
        }
        #endregion
        #region 退回登陆界面按钮
        this.m_Button_BackLogin = base.GetUIObject("pn_create2/bt_backlogin") as IXUIButton;
        if (null == this.m_Button_BackLogin)
        {
            Debug.Log("this.m_Button_Back == null");
            this.m_Button_BackLogin = WidgetFactory.CreateWidget <IXUIButton>();
        }
        #endregion
        #region 进入修饰角色头发等按钮
        this.m_Button_Next = base.GetUIObject("pn_create1/bt_next") as IXUIButton;
        if (this.m_Button_Next == null)
        {
            Debug.LogWarning("ButtonNext == null");
            this.m_Button_Next = WidgetFactory.CreateWidget <IXUIButton>();
        }
        #endregion
        #region 返回到选择角色职业按钮
        this.m_Button_BackSelectRoleType = base.GetUIObject("pn_create2/bt_back") as IXUIButton;
        #endregion
        #region 人物选择按钮

        /*this.m_Button_Explorer = base.GetUIObject("Explorer") as IXUICheckBox;
         * this.m_Button_Engineer = base.GetUIObject("Engineer") as IXUICheckBox;
         * this.m_Button_SoulHunter = base.GetUIObject("SoulHunter") as IXUICheckBox;
         * this.m_Button_Cultivator = base.GetUIObject("Cultivator") as IXUICheckBox;
         * this.m_Button_Magician = base.GetUIObject("Magician") as IXUICheckBox;
         * this.m_Button_WitchDoctor = base.GetUIObject("WitchDoctor") as IXUICheckBox;
         */
        this.m_List_RoleType = base.GetUIObject("pn_create1/sp_link/sp_roletype_bg/tb_roletype") as IXUIList;
        #endregion
        #region 人物性别

        /* this.m_Button_RoleMan = base.GetUIObject("Sex/Man") as IXUICheckBox;
         * this.m_Buttin_RoleWoman = base.GetUIObject("Sex/Woman") as IXUICheckBox;
         */
        #endregion
        #region 人物介绍
        this.m_Label_RoleIntroduce = base.GetUIObject("pn_create1/sp_intro") as IXUIGroup;
        #endregion
        #region 人物视频
        this.m_Sprite_RoleMovie = base.GetUIObject("pn_create1/sp_intro/sp_video/tx_video") as IXUIPicture;
        #endregion
        #region 人物名字
        this.m_Input_RoleName = base.GetUIObject("pn_create2/sp_link/ip_username") as IXUIInput;
        #endregion
    }
コード例 #7
0
 public override void Init()
 {
     base.Init();
     this.m_List_Info = base.GetUIObject("list_SystemInfo") as IXUIList;
     if (this.m_List_Info == null)
     {
         Debug.Log("this.m_List_Info == null");
     }
 }
コード例 #8
0
 public override void Init()
 {
     base.Init();
     this.m_Button_Sure     = base.GetUIObject("sureButton") as IXUIButton;
     this.m_Button_Back     = base.GetUIObject("backButton") as IXUIButton;
     this.m_Button_Create   = base.GetUIObject("createButton") as IXUIButton;
     this.m_Button_Delete   = base.GetUIObject("deleteButton") as IXUIButton;
     this.m_List_RoleList   = base.GetUIObject("roleList") as IXUIList;
     this.m_Model_RoleModel = base.GetUIObject("roleModel") as IXUIGroup;
 }
コード例 #9
0
ファイル: DlgRoom.cs プロジェクト: githuanl/NewBeastGame
    private void RefreshPlayerInfo(IXUIListItem item, BeastData beast)
    {
        //DataBeastlist dataBeast = GameData<DataBeastlist>.dataMap[beast.BeastTypeId];
        DataBeastlist dataBeast = null;

        GameData <DataBeastlist> .dataMap.TryGetValue(beast.BeastTypeId, out dataBeast);

        IXUISprite icon = item.GetUIObject("Sprite_Icon") as IXUISprite;

        if (dataBeast != null)
        {
            //如果是自己的阵营,就显示头像。地方就显示随机头像
            if (beast.CampType == Singleton <PlayerRole> .singleton.CampType)
            {
                icon.SetSprite(dataBeast.IconFile, UIManager.singleton.GetAtlasName(EnumAtlasType.Beast, dataBeast.IconFile));
            }
            else
            {
                //icon.SetSprite("Window");
                icon.SetSprite(dataBeast.IconFile, UIManager.singleton.GetAtlasName(EnumAtlasType.Beast, dataBeast.IconFile));
            }
        }
        else
        {
            if (beast.BeastTypeId == this.m_unRandomBeastID)
            {
                icon.SetSprite("9");
            }
        }
        bool     visible   = Singleton <RoomManager> .singleton.IsObserver || Singleton <PlayerRole> .singleton.CampType == beast.CampType;
        IXUIList equipList = item.GetUIObject("List_Equip") as IXUIList;

        if (equipList != null)
        {
        }
        else
        {
            XLog.Log.Error("null == uiListEquip");
        }
        this.RefreshItemEnable(item, beast.Id);
        IXUIObject uiObject = item.GetUIObject("Texture_Shadow");

        if (uiObject != null)
        {
            uiObject.SetVisible(false);
        }
        item.Id = beast.Id;
    }
コード例 #10
0
        /// <summary>
        /// 取得ui组件,根据ui的名字id
        /// </summary>
        /// <param name="strUIObjectId"></param>
        /// <returns></returns>
        public IXUIObject GetUIObject(string strUIObjectId)
        {
            if (string.IsNullOrEmpty(strUIObjectId))
            {
                return(null);
            }
            string[] array = strUIObjectId.Split(new char[]
            {
                '#'
            });
            IXUIDlg iXUIDlg = this.GetDlg(array[0]);

            if (iXUIDlg == null || iXUIDlg.uiBehaviourInterface == null)
            {
                return(null);
            }
            IXUIObject iXUIObject = iXUIDlg.uiBehaviourInterface;

            try
            {
                for (int i = 1; i < array.Length; i++)
                {
                    string strPath = array[i];
                    iXUIObject = iXUIObject.GetUIObject(strPath);//取得这个界面的组件
                    IXUIList iXUIList = iXUIObject as IXUIList;
                    if (iXUIList != null)
                    {
                        i++;
                        if (i < array.Length)
                        {
                            uint num = Convert.ToUInt32(array[i]);
                            iXUIObject = iXUIList.GetItemById(num, true);
                            if (iXUIObject == null)
                            {
                                this.m_log.Error(string.Format("null == uiObject:{0}:{1}", strPath, num));
                                return(null);
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                this.m_log.Fatal(e.ToString());
            }
            return(iXUIObject);
        }
コード例 #11
0
ファイル: DlgRoom.cs プロジェクト: githuanl/NewBeastGame
 /// <summary>
 /// 我方和敌方的选择神兽列表刷新
 /// </summary>
 /// <param name="uiList"></param>
 /// <param name="listPlayerData"></param>
 /// <param name="eCampType"></param>
 private void SetPlayerInfoToList(IXUIList uiList, List <PlayerData> listPlayerData, ECampType eCampType)
 {
     if (uiList != null)
     {
         for (int i = 0; i < uiList.Count; i++)
         {
             IXUIListItem item = uiList.GetItemByIndex(i);
             if (item != null)
             {
                 item.Clear();
                 IXUIList equip = item.GetUIObject("List_Equip") as IXUIList;
                 if (equip != null)
                 {
                     for (int j = 0; j < equip.Count; j++)
                     {
                         IXUIListItem equipItem = equip.GetItemByIndex(j);
                         if (equipItem != null)
                         {
                             equipItem.Clear();//清空装备icon
                         }
                     }
                 }
                 IXUIObject uiObject = item.GetUIObject("Texture_Shadow") as IXUIObject;
                 if (uiObject != null)
                 {
                     uiObject.SetVisible(true);
                 }
                 item.SetText("Label_Sequence", "");
             }
         }
         int num = 0;
         foreach (var playerData in listPlayerData)
         {
             foreach (var beastData in playerData.Beasts)
             {
                 IXUIListItem item = (num >= uiList.Count) ? null : uiList.GetItemByIndex(num);
                 if (item != null)
                 {
                     this.RefreshPlayerInfo(item, playerData, beastData, eCampType);
                 }
                 num++;
             }
         }
         Debug.Log("Beast num=" + num);
     }
 }
コード例 #12
0
 //public IXUIProgress m_progressBar = null;
 #endregion
 #region 属性
 #endregion
 #region 构造方法
 #endregion
 #region 公有方法
 public override void Init()
 {
     base.Init();
     #region 我方角色
     this.m_list_OurPlayer = base.GetUIObject("Top/OurPlayerList") as IXUIList;
     #endregion
     #region 敌方角色
     this.m_list_EnemyPlayer = base.GetUIObject("Down/EnemyPlayerList") as IXUIList;
     #endregion
     #region 加载背景
     this.m_sprite_Bg = base.GetUIObject("Background") as IXUISprite;
     #endregion
     #region 加载时的小提示
     this.m_label_Tip = base.GetUIObject("Center/Label_Tip") as IXUILabel;
     #endregion
     #region 加载进度条
     //this.m_progressBar = base.GetUIObject("") as IXUIProgress;
     #endregion
 }
コード例 #13
0
 public override void Init()
 {
     base.Init();
     this.m_List_Hp       = this.GetUIObject("list_hp") as IXUIList;
     this.m_Progress_Time = this.GetUIObject("pb_time") as IXUIProgress;
 }
コード例 #14
0
 public HpFlyTextManager(IXUIList uiList)
     : base(uiList)
 {
     this.m_fTotalTime = 3f;
 }
コード例 #15
0
 public override void Init()
 {
     base.Init();
     this.List_Demage = base.GetUIObject("List_Damage") as IXUIList;
 }
コード例 #16
0
 public FlyTextManagerBase(IXUIList uiList)
 {
     this.m_uiList = uiList;
 }
コード例 #17
0
 public SystemInfoFlyTextManager(IXUIList list) : base(list)
 {
     this.m_fTotalTime = 2.5f;
 }
コード例 #18
0
 protected virtual void OnAddListItem(IXUIDlg uiDlg, IXUIList uiList, IXUIListItem uiListItem)
 {
 }