Пример #1
0
 public static UI_Main CreateInstance()
 {
     return((UI_Main)UIPackage.CreateObject("Basics", "Main"));
 }
Пример #2
0
 private static GObject CreateGObject()
 {
     return(UIPackage.CreateObject(UIPackageName, UIResName));
 }
Пример #3
0
 public static L3_AccountDefault CreateInstance()
 {
     return((L3_AccountDefault)UIPackage.CreateObject("Login", "L3_AccountDefault"));
 }
Пример #4
0
    public bool SC_GetJoinGuildPlayer(Protomsg.MsgBase d1)
    {
        Debug.Log("SC_GetJoinGuildPlayer:");
        IMessage IMperson = new Protomsg.SC_GetJoinGuildPlayer();

        Protomsg.SC_GetJoinGuildPlayer p1 = (Protomsg.SC_GetJoinGuildPlayer)IMperson.Descriptor.Parser.ParseFrom(d1.Datas);
        //创建界面
        if (main == null)
        {
            return(true);
        }

        //-------------------------公会成员--------------------------
        main.GetChild("requestlist").asList.RemoveChildren(0, -1, true);
        //处理排序
        Protomsg.GuildChaInfo[] allplayer = new Protomsg.GuildChaInfo[p1.RequestCharacters.Count];
        int index = 0;

        foreach (var item in p1.RequestCharacters)
        {
            allplayer[index++] = item;
        }
        System.Array.Sort(allplayer, (a, b) => {
            if (a.Level > b.Level)
            {
                return(1);
            }
            else
            {
                return(-1);
            }
        });
        foreach (var item in allplayer)
        {
            var onedropitem = UIPackage.CreateObject("GameUI", "GuildRequestPlayerOne").asCom;
            onedropitem.GetChild("heroicon").onClick.Add(() =>
            {
                new HeroSimpleInfo(item.Characterid);
            });
            onedropitem.GetChild("agree").onClick.Add(() =>
            {
                //同意
                Protomsg.CS_ResponseJoinGuildPlayer msg1 = new Protomsg.CS_ResponseJoinGuildPlayer();
                msg1.Characterid = item.Characterid;
                msg1.Result      = 1;
                MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_ResponseJoinGuildPlayer", msg1);
            });
            onedropitem.GetChild("no").onClick.Add(() =>
            {
                //拒绝
                Protomsg.CS_ResponseJoinGuildPlayer msg1 = new Protomsg.CS_ResponseJoinGuildPlayer();
                msg1.Characterid = item.Characterid;
                msg1.Result      = 0;
                MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_ResponseJoinGuildPlayer", msg1);
            });
            onedropitem.GetChild("name").asTextField.text  = item.Name;
            onedropitem.GetChild("level").asTextField.text = item.Level + "";


            var clientitem = ExcelManager.Instance.GetUnitInfoManager().GetUnitInfoByID(item.Typeid);
            if (clientitem != null)
            {
                onedropitem.GetChild("heroicon").asLoader.url = clientitem.IconPath;
            }

            main.GetChild("requestlist").asList.AddChild(onedropitem);
        }

        return(true);
    }
Пример #5
0
 public static UI_TabSecretaryInfo CreateInstance()
 {
     return((UI_TabSecretaryInfo)UIPackage.CreateObject("Zoo", "TabSecretaryInfo"));
 }
Пример #6
0
    //获取公会地图信息
    public bool SC_GetGuildMapsInfo(Protomsg.MsgBase d1)
    {
        Debug.Log("CS_GetGuildMapsInfo:");
        IMessage IMperson = new Protomsg.SC_GetGuildMapsInfo();

        Protomsg.SC_GetGuildMapsInfo p1 = (Protomsg.SC_GetGuildMapsInfo)IMperson.Descriptor.Parser.ParseFrom(d1.Datas);
        if (main == null)
        {
            return(true);
        }
        main.GetChild("maplist").asList.RemoveChildren(0, -1, true);

        Protomsg.GuildMapInfo[] allplayer = new Protomsg.GuildMapInfo[p1.Maps.Count];
        p1.Maps.CopyTo(allplayer, 0);
        System.Array.Sort(allplayer, (a, b) => {
            if (a.ID > b.ID)
            {
                return(1);
            }
            else if (a.ID < b.ID)
            {
                return(-1);
            }
            return(0);
        });

        //遍历
        foreach (var item in allplayer)
        {
            var clientitem = ExcelManager.Instance.GetSceneManager().GetSceneByID(item.NextSceneID);
            if (clientitem == null)
            {
                continue;
            }

            var onedropitem = UIPackage.CreateObject("GameUI", "GuildMapInfo").asCom;


            //onedropitem.GetChild("item").asCom.GetChild("icon").asLoader.url = clientitem.IconPath;
            onedropitem.GetChild("name").asTextField.text       = clientitem.Name;
            onedropitem.GetChild("guildlevel").asTextField.text = item.NeedGuildLevel + "";
            onedropitem.GetChild("time").asTextField.text       = item.OpenStartTime + "--" + item.OpenEndTime;
            onedropitem.GetChild("week").asTextField.text       = "周" + item.OpenWeekDay;

            //进入
            onedropitem.GetChild("goto").asButton.onClick.Add(() =>
            {
                Protomsg.CS_GotoGuildMap msg1 = new Protomsg.CS_GotoGuildMap();
                msg1.ID = item.ID;
                MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_GotoGuildMap", msg1);
            });
            //地图信息
            onedropitem.GetChild("icon").asLoader.onClick.Add(() =>
            {
                Protomsg.CS_GetMapInfo msg1 = new Protomsg.CS_GetMapInfo();
                msg1.SceneID = item.NextSceneID;
                MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_GetMapInfo", msg1);
            });

            main.GetChild("maplist").asList.AddChild(onedropitem);
        }

        return(true);
    }
Пример #7
0
    public bool SC_GetGuildRankInfo(Protomsg.MsgBase d1)
    {
        Debug.Log("SC_GetGuildRankInfo:");
        IMessage IMperson = new Protomsg.SC_GetGuildRankInfo();

        Protomsg.SC_GetGuildRankInfo p1 = (Protomsg.SC_GetGuildRankInfo)IMperson.Descriptor.Parser.ParseFrom(d1.Datas);
        //创建界面
        if (main == null)
        {
            return(true);
        }


        //-------------------------公会排名--------------------------
        main.GetChild("ranklist").asList.RemoveChildren(0, -1, true);
        //处理排序
        Protomsg.GuildShortInfo[] allplayer = new Protomsg.GuildShortInfo[p1.Guilds.Count];
        int index = 0;

        foreach (var item in p1.Guilds)
        {
            allplayer[index++] = item;
            Debug.Log("11SC_GetGuildRankInfo:" + item.Rank);
        }
        System.Array.Sort(allplayer, (a, b) => {
            if (a.Rank > b.Rank)
            {
                return(1);
            }
            else if (a.Rank == b.Rank)
            {
                return(0);
            }
            else
            {
                return(-1);
            }
        });
        foreach (var item in allplayer)
        {
            var onerank = UIPackage.CreateObject("GameUI", "GuildRankOne").asCom;

            onerank.GetChild("rank").asTextField.text  = item.Rank + "";
            onerank.GetChild("name").asTextField.text  = item.Name;
            onerank.GetChild("level").asTextField.text = "lv." + item.Level;
            onerank.GetChild("count").asTextField.text = item.CharacterCount + "/" + item.MaxCount;
            main.GetChild("ranklist").asList.AddChild(onerank);
        }

        //地图信息
        var clientitem = ExcelManager.Instance.GetSceneManager().GetSceneByID(p1.MapInfo.NextSceneID);

        if (clientitem == null)
        {
            return(true);
        }

        main.GetChild("rankuiname").asTextField.text       = clientitem.Name;
        main.GetChild("rankuiguildlevel").asTextField.text = p1.MapInfo.NeedGuildLevel + "";
        main.GetChild("rankuitime").asTextField.text       = p1.MapInfo.OpenStartTime + "--" + p1.MapInfo.OpenEndTime;
        main.GetChild("rankuiweek").asTextField.text       = "周" + p1.MapInfo.OpenWeekDay;

        //进入
        main.GetChild("rankuigoto").asButton.onClick.Add(() =>
        {
            Protomsg.CS_GotoGuildMap msg1 = new Protomsg.CS_GotoGuildMap();
            msg1.ID = p1.MapInfo.ID;
            MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_GotoGuildMap", msg1);
        });

        //击杀情况 CS_GetGuildRankBattleInfo
        main.GetChild("rankuikillinfo").asButton.onClick.Add(() =>
        {
            Protomsg.CS_GetGuildRankBattleInfo msg1 = new Protomsg.CS_GetGuildRankBattleInfo();
            msg1.ID = p1.MapInfo.ID;
            MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_GetGuildRankBattleInfo", msg1);
        });

        return(true);
    }
Пример #8
0
 public static Pup_6 CreateInstance()
 {
     return((Pup_6)UIPackage.CreateObject("Login", "Pup_6"));
 }
Пример #9
0
 public static UI_BagGridSub CreateInstance()
 {
     return((UI_BagGridSub)UIPackage.CreateObject("main", "BagGridSub"));
 }
Пример #10
0
 public static UI_Main2 CreateInstance()
 {
     return((UI_Main2)UIPackage.CreateObject("Battle", "Main2"));
 }
Пример #11
0
 public static HpBar CreateInstance()
 {
     return((HpBar)UIPackage.CreateObject("Battle", "HpBar"));
 }
Пример #12
0
 public static BasicPassword CreateInstance()
 {
     return((BasicPassword)UIPackage.CreateObject("SimpleUI", "BasicPassword"));
 }
Пример #13
0
 public static UI_BagItemInfo1 CreateInstance()
 {
     return((UI_BagItemInfo1)UIPackage.CreateObject("Bag", "BagItemInfo1"));
 }
Пример #14
0
 public static UI_ExploreView CreateInstance()
 {
     return((UI_ExploreView)UIPackage.CreateObject("Explore", "ExploreView"));
 }
Пример #15
0
 public static UI_CreatingBookInfo CreateInstance()
 {
     return((UI_CreatingBookInfo)UIPackage.CreateObject("SkillCreate", "CreatingBookInfo"));
 }
Пример #16
0
 public static CommonProperty CreateInstance()
 {
     return((CommonProperty)UIPackage.CreateObject("Common", "CommonProperty"));
 }
Пример #17
0
    public bool SC_GetAllGuildsInfo(Protomsg.MsgBase d1)
    {
        Debug.Log("SC_GetAllGuildsInfo:");
        IMessage IMperson = new Protomsg.SC_GetAllGuildsInfo();

        Protomsg.SC_GetAllGuildsInfo p1 = (Protomsg.SC_GetAllGuildsInfo)IMperson.Descriptor.Parser.ParseFrom(d1.Datas);

        //创建界面
        if (main != null)
        {
            main.Dispose();
        }
        main = UIPackage.CreateObject("GameUI", "AllGuilds").asCom;
        GRoot.inst.AddChild(main);
        main.xy = Tool.GetPosition(0.5f, 0.5f);
        main.GetChild("close").asButton.onClick.Add(() =>
        {
            this.Destroy();
        });
        //创建公会按钮
        main.GetChild("add").asButton.onClick.Add(() =>
        {
            this.createguildwindow(p1.CreatePrice, p1.CreatePriceType);
        });

        //main.GetChild("list").asList.RemoveChildren(0, -1, true);
        //处理排序
        Protomsg.GuildShortInfo[] allplayer = new Protomsg.GuildShortInfo[p1.Guilds.Count];
        int index = 0;

        foreach (var item in p1.Guilds)
        {
            allplayer[index++] = item;
        }
        System.Array.Sort(allplayer, (a, b) => {
            if (a.Rank < b.Rank)
            {
                return(1);
            }
            else if (a.Rank == b.Rank)
            {
                if (a.Level > b.Level)
                {
                    return(1);
                }
                else if (a.Level == b.Level)
                {
                    if (a.Experience > b.Experience)
                    {
                        return(1);
                    }
                    else
                    {
                        return(-1);
                    }
                }
                else
                {
                    return(-1);
                }
            }
            return(0);
        });
        foreach (var item in allplayer)
        {
            var onedropitem = UIPackage.CreateObject("GameUI", "GuildsOne").asCom;

            onedropitem.GetChild("add").onClick.Add(() =>
            {
                //申请加入公会
                Protomsg.CS_JoinGuild msg1 = new Protomsg.CS_JoinGuild();
                msg1.ID = item.ID;
                MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_JoinGuild", msg1);
            });
            onedropitem.GetChild("name").asTextField.text       = item.Name;
            onedropitem.GetChild("level").asTextField.text      = item.Level + "";
            onedropitem.GetChild("count").asTextField.text      = item.CharacterCount + "/" + item.MaxCount;
            onedropitem.GetChild("president").asTextField.text  = item.PresidentName;
            onedropitem.GetChild("levellimit").asTextField.text = item.Joinlevellimit + "";

            main.GetChild("list").asList.AddChild(onedropitem);
        }

        return(true);
    }
Пример #18
0
 public static CommonProgressBar CreateInstance()
 {
     return((CommonProgressBar)UIPackage.CreateObject("Common", "CommonProgressBar"));
 }
Пример #19
0
    public bool SC_GetAuctionItems(Protomsg.MsgBase d1)
    {
        Debug.Log("SC_GetAuctionItems:");
        IMessage IMperson = new Protomsg.SC_GetAuctionItems();

        Protomsg.SC_GetAuctionItems p1 = (Protomsg.SC_GetAuctionItems)IMperson.Descriptor.Parser.ParseFrom(d1.Datas);
        if (main == null)
        {
            return(true);
        }
        main.GetChild("auctionlist").asList.RemoveChildren(0, -1, true);
        //处理排序
        Protomsg.AuctionItem[] allplayer = new Protomsg.AuctionItem[p1.Items.Count];
        p1.Items.CopyTo(allplayer, 0);
        System.Array.Sort(allplayer, (a, b) => {
            if (a.RemainTime > b.RemainTime)
            {
                return(1);
            }
            else if (a.RemainTime < b.RemainTime)
            {
                return(-1);
            }
            return(0);
        });

        //遍历
        foreach (var item in allplayer)
        {
            var clientitem = ExcelManager.Instance.GetItemManager().GetItemByID(item.ItemID);
            if (clientitem == null)
            {
                continue;
            }

            var onedropitem = UIPackage.CreateObject("GameUI", "AuctionOne").asCom;
            if (clientitem.Name == "")
            {
                onedropitem.GetChild("name").asTextField.text = "无";
            }
            else
            {
                onedropitem.GetChild("name").asTextField.text = clientitem.Name;
            }

            onedropitem.GetChild("item").asCom.GetChild("icon").asLoader.url      = clientitem.IconPath;
            onedropitem.GetChild("item").asCom.GetChild("level").asTextField.text = item.Level + "";
            onedropitem.GetChild("item").asCom.onClick.Add(() =>
            {
                string des = "\n\n参与分红的成员:\n";
                foreach (var item1 in item.ReceivecharactersName)
                {
                    if (item1 == item.ReceivecharactersName[item.ReceivecharactersName.Count - 1])
                    {
                        des += item1;
                    }
                    else
                    {
                        des += item1 + ",";
                    }
                }
                new ItemInfo(item.ItemID).AddDes(des);
            });

            onedropitem.GetChild("pricetype").asLoader.url      = Tool.GetPriceTypeIcon(item.PriceType);
            onedropitem.GetChild("price").asTextField.text      = item.Price + "";
            onedropitem.GetChild("playername").asTextField.text = item.BidderCharacterName;
            onedropitem.GetChild("remaintime").asTextField.text = Tool.Time2String(item.RemainTime);

            //出价
            onedropitem.GetChild("add").asButton.onClick.Add(() =>
            {
                //售卖
                var sellwindow = UIPackage.CreateObject("GameUI", "NewPrice").asCom;
                GRoot.inst.AddChild(sellwindow);
                sellwindow.xy = Tool.GetPosition(0.5f, 0.5f);
                sellwindow.GetChild("close").onClick.Add(() =>
                {
                    sellwindow.Dispose();
                });
                sellwindow.GetChild("yes_btn").onClick.Add(() =>
                {
                    var txt = sellwindow.GetChild("input").asTextInput.text;
                    if (txt.Length <= 0)
                    {
                        Tool.NoticeWords("请输入价格!", null);
                        return;
                    }

                    int price = 0;
                    try
                    {
                        price = Convert.ToInt32(txt); //报异常
                    }
                    catch (SystemException e)
                    {
                        Tool.NoticeWords("请输入正确的价格!", null);
                        return;
                    }
                    if (price <= 0)
                    {
                        Tool.NoticeWords("请输入正确的价格!", null);
                        return;
                    }
                    //上架
                    Protomsg.CS_NewPriceAuctionItem msg1 = new Protomsg.CS_NewPriceAuctionItem();
                    msg1.Price = price;
                    msg1.ID    = item.ID;
                    MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_NewPriceAuctionItem", msg1);
                    sellwindow.Dispose();
                });
                sellwindow.GetChild("item").asCom.GetChild("icon").asLoader.url      = clientitem.IconPath;
                sellwindow.GetChild("item").asCom.GetChild("level").asTextField.text = item.Level + "";
                sellwindow.GetChild("name").asTextField.text  = clientitem.Name;
                sellwindow.GetChild("pricetype").asLoader.url = Tool.GetPriceTypeIcon(item.PriceType);
                sellwindow.GetChild("input").asTextInput.text = (item.Price + 1) + "";
            });

            main.GetChild("auctionlist").asList.AddChild(onedropitem);
        }

        return(true);
    }
Пример #20
0
 public static BuffRender CreateInstance()
 {
     return((BuffRender)UIPackage.CreateObject("Battle", "BuffRender"));
 }
Пример #21
0
    public bool SC_GetGuildInfo(Protomsg.MsgBase d1)
    {
        Debug.Log("SC_GetGuildInfo:");
        IMessage IMperson = new Protomsg.SC_GetGuildInfo();

        Protomsg.SC_GetGuildInfo p1 = (Protomsg.SC_GetGuildInfo)IMperson.Descriptor.Parser.ParseFrom(d1.Datas);
        //创建界面
        if (main != null)
        {
            main.Dispose();
        }
        main = UIPackage.CreateObject("GameUI", "GuildInfo").asCom;
        GRoot.inst.AddChild(main);
        main.xy = Tool.GetPosition(0.5f, 0.5f);
        main.GetChild("close").asButton.onClick.Add(() =>
        {
            this.Destroy();
        });
        //自己退出公会
        main.GetChild("exit").asButton.onClick.Add(() =>
        {
            Tool.NoticeWindonw("你确定要退出公会吗?", () =>
            {
                Protomsg.CS_GuildOperate msg1 = new Protomsg.CS_GuildOperate();
                msg1.Code = 1;//
                MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_GuildOperate", msg1);
            });
        });
        //解散公会
        main.GetChild("dismiss").asButton.onClick.Add(() =>
        {
            Tool.NoticeWindonw("你确定要解散公会吗?", () =>
            {
                Protomsg.CS_GuildOperate msg1 = new Protomsg.CS_GuildOperate();
                msg1.Code = 2;//
                MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_GuildOperate", msg1);
            });
        });

        //修改公告
        main.GetChild("editornotice").asButton.onClick.Add(() =>
        {
            createguildeditornotice(p1.GuildBaseInfo.Notice);
        });


        //
        main.GetChild("request").asButton.onClick.Add(() =>
        {
            //查看申请列表
            Protomsg.CS_GetJoinGuildPlayer msg1 = new Protomsg.CS_GetJoinGuildPlayer();
            msg1.ID = p1.GuildBaseInfo.ID;
            MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_GetJoinGuildPlayer", msg1);
        });
        //查看拍卖行
        main.GetChild("auction").asButton.onClick.Add(() =>
        {
            //查看申请列表
            Protomsg.CS_GetAuctionItems msg1 = new Protomsg.CS_GetAuctionItems();
            MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_GetAuctionItems", msg1);
        });

        //查看公会地图
        main.GetChild("huodong").asButton.onClick.Add(() =>
        {
            //查看申请列表
            Protomsg.CS_GetGuildMapsInfo msg1 = new Protomsg.CS_GetGuildMapsInfo();
            msg1.ID = p1.GuildBaseInfo.ID;
            MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_GetGuildMapsInfo", msg1);
        });

        //查看公会排名信息
        main.GetChild("rank").asButton.onClick.Add(() =>
        {
            Protomsg.CS_GetGuildRankInfo msg1 = new Protomsg.CS_GetGuildRankInfo();
            MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_GetGuildRankInfo", msg1);
        });

        //-------------------------公会成员--------------------------
        //处理排序
        Protomsg.GuildChaInfo[] allplayer = new Protomsg.GuildChaInfo[p1.Characters.Count];
        int index = 0;

        foreach (var item in p1.Characters)
        {
            allplayer[index++] = item;
            Debug.Log("SC_GetGuildInfo111   :" + item.Level + " name:" + item.Name);
        }
        Array.Sort(allplayer, (a, b) => {
            if (a.Post > b.Post)
            {
                return(-1);
            }
            else if (a.Post == b.Post)
            {
                if (a.Level > b.Level)
                {
                    return(-1);
                }
                else if (a.Level == b.Level)
                {
                    //return 0;
                    if (a.PinLevel > b.PinLevel)
                    {
                        return(-1);
                    }
                    else if (a.PinLevel == b.PinLevel)
                    {
                        if (a.PinExperience > b.PinExperience)
                        {
                            return(-1);
                        }
                        else
                        {
                            return(1);
                        }
                    }
                    else
                    {
                        return(1);
                    }
                }
                else
                {
                    return(1);
                }
            }
            else
            {
                return(1);
            }
        });
        foreach (var item in allplayer)
        {
            Debug.Log("SC_GetGuildInfo   :" + item.Level + " name:" + item.Name);
            var onedropitem = UIPackage.CreateObject("GameUI", "GuildPlayerOne").asCom;
            onedropitem.GetChild("heroicon").onClick.Add(() =>
            {
                new HeroSimpleInfo(item.Characterid);
            });
            //改变职位
            onedropitem.GetChild("changepost").onClick.Add(() =>
            {
                var teamrequest = UIPackage.CreateObject("GameUI", "ChangePost").asCom;
                GRoot.inst.AddChild(teamrequest);
                teamrequest.xy = Tool.GetPosition(0.5f, 0.5f);
                teamrequest.GetChild("close").asButton.onClick.Add(() =>
                {
                    teamrequest.Dispose();
                });

                AudioManager.Am.Play2DSound(AudioManager.Sound_OpenLittleUI);
                //SrcUnitTypeID
                var clientcha = ExcelManager.Instance.GetUnitInfoManager().GetUnitInfoByID(item.Typeid);
                if (clientcha != null)
                {
                    teamrequest.GetChild("headicon").asLoader.url = clientcha.IconPath;
                }
                teamrequest.GetChild("name").asTextField.text  = item.Name;
                teamrequest.GetChild("level").asTextField.text = item.Level + "";

                teamrequest.GetChild("post1").asButton.onClick.Add(() =>
                {
                    //回复拒绝好友请求
                    Protomsg.CS_ChangePost msg1 = new Protomsg.CS_ChangePost();
                    msg1.Characterid            = item.Characterid;
                    msg1.Post = 1;
                    MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_ChangePost", msg1);
                    teamrequest.Dispose();
                });

                teamrequest.GetChild("post9").asButton.onClick.Add(() =>
                {
                    //回复同意组队请求
                    Protomsg.CS_ChangePost msg1 = new Protomsg.CS_ChangePost();
                    msg1.Characterid            = item.Characterid;
                    msg1.Post = 9;
                    MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_ChangePost", msg1);
                    teamrequest.Dispose();
                });
            });

            onedropitem.GetChild("add").onClick.Add(() =>
            {
                //踢出公会
                Tool.NoticeWindonw("你确定要把(" + item.Name + ")踢出公会吗?", () =>
                {
                    Protomsg.CS_DeleteGuildPlayer msg1 = new Protomsg.CS_DeleteGuildPlayer();
                    msg1.Characterid = item.Characterid;
                    MyKcp.Instance.SendMsg(GameScene.Singleton.m_ServerName, "CS_DeleteGuildPlayer", msg1);
                });
            });
            onedropitem.GetChild("name").asTextField.text       = item.Name;
            onedropitem.GetChild("level").asTextField.text      = item.Level + "";
            onedropitem.GetChild("pinlevel").asTextField.text   = item.PinLevelName;
            onedropitem.GetChild("post").asTextField.text       = item.PostName;
            onedropitem.GetChild("experience").asTextField.text = item.PinExperience + "/" + item.PinMaxExperience;

            var clientitem = ExcelManager.Instance.GetUnitInfoManager().GetUnitInfoByID(item.Typeid);
            if (clientitem != null)
            {
                onedropitem.GetChild("heroicon").asLoader.url = clientitem.IconPath;
            }

            main.GetChild("mainlist").asList.AddChild(onedropitem);
        }
        //-----------------公会信息------------------
        main.GetChild("name").asTextField.text        = p1.GuildBaseInfo.Name;
        main.GetChild("level").asTextField.text       = "Lv." + p1.GuildBaseInfo.Level;
        main.GetChild("experience").asTextField.text  = p1.GuildBaseInfo.Experience + "/" + p1.GuildBaseInfo.MaxExperience;
        main.GetChild("playercount").asTextField.text = p1.GuildBaseInfo.CharacterCount + "/" + p1.GuildBaseInfo.MaxCount;
        main.GetChild("gonggao").asTextField.text     = p1.GuildBaseInfo.Notice;
        return(true);
    }
Пример #22
0
 public static L3_AM_ChangeUNLogin CreateInstance()
 {
     return((L3_AM_ChangeUNLogin)UIPackage.CreateObject("Login", "L3_AM_ChangeUNLogin"));
 }
Пример #23
0
 public static UI_SelectPupilView CreateInstance()
 {
     return((UI_SelectPupilView)UIPackage.CreateObject("Adventure", "SelectPupilView"));
 }
Пример #24
0
 public static UI_ChooseHero CreateInstance()
 {
     return((UI_ChooseHero)UIPackage.CreateObject("Battle", "ChooseHero"));
 }
Пример #25
0
 public static UI_BagWin CreateInstance()
 {
     return((UI_BagWin)UIPackage.CreateObject("main", "BagWin"));
 }
Пример #26
0
    public static void PaoMaDeng(string word, Google.Protobuf.Collections.RepeatedField <string> p)
    {
        //处理文字
        Dictionary <string, string> pa = new Dictionary <string, string>();

        if (p != null && p.Count > 0)
        {
            int index = 1;
            foreach (var item in p)
            {
                pa["p" + index] = item;
                index++;
            }
        }
        word = Tool.ParseTemplate(word, pa);

        if (PaoMaDengCom == null)
        {
            PaoMaDengCom = UIPackage.CreateObject("GameUI", "PaoMaDeng").asCom;
            GRoot.inst.AddChild(PaoMaDengCom);
            PaoMaDengCom.xy = Tool.GetPosition(0.5f, 0.2f);

            PaoMaDengCom.GetChild("word").asTextField.text = word;


            FairyGUI.Transition trans = PaoMaDengCom.GetTransition("move2left");

            var speed    = 200.0f;
            var distanse = 800 + PaoMaDengCom.GetChild("word").width;
            var time     = distanse / speed;
            trans.SetValue("over", -PaoMaDengCom.GetChild("word").width, 5);
            trans.SetDuration("start", time);

            trans.Play();
            LastPlayTime = GetTime();
            trans.SetHook("over", () => {
                PaoMaDengCom.Dispose();
                PaoMaDengCom = null;
            });
        }
        else
        {
            var lasttext = PaoMaDengCom.GetChild("word").asTextField.text;
            PaoMaDengCom.GetChild("word").asTextField.text = " ";
            for (;;)
            {
                if (PaoMaDengCom.GetChild("word").width >= 800)
                {
                    break;
                }
                PaoMaDengCom.GetChild("word").asTextField.text += " ";
            }
            var space = PaoMaDengCom.GetChild("word").asTextField.text;
            PaoMaDengCom.GetChild("word").asTextField.text = lasttext + space + word;
            FairyGUI.Transition trans = PaoMaDengCom.GetTransition("move2left");
            //trans.SetPaused(true);
            var speed    = 200.0f;
            var distanse = 800 + PaoMaDengCom.GetChild("word").width;
            Debug.Log("distanse:" + distanse);
            var time = distanse / speed;
            trans.SetValue("over", -PaoMaDengCom.GetChild("word").width, 5);
            trans.SetDuration("start", time);
            trans.SetHook("over", null);

            trans.Play(1, 0, (float)(GetTime() - LastPlayTime), time, null);
            trans.SetHook("over", () => {
                PaoMaDengCom.Dispose();
                PaoMaDengCom = null;
            });
            //trans.SetPaused(false);
        }
    }
Пример #27
0
 public static UI_MapTopInfo CreateInstance()
 {
     return((UI_MapTopInfo)UIPackage.CreateObject("Adventure", "MapTopInfo"));
 }
Пример #28
0
 public static Block_Pup CreateInstance()
 {
     return((Block_Pup)UIPackage.CreateObject("Login", "Block_Pup"));
 }
Пример #29
0
 public static UI_ActionCard CreateInstance()
 {
     return((UI_ActionCard)UIPackage.CreateObject("Battle", "HandCard"));
 }
Пример #30
0
 public static BagWin CreateInstance()
 {
     return((BagWin)UIPackage.CreateObject("Bag", "BagWin"));
 }