Exemplo n.º 1
0
    private void SetUpLvInfo()
    {
        //LoadSprite.LoaderBuild(panel.build, "build"+ guildbuildinfo.id, false);

        //panel.buildlv.text = guildbuildinfo.level + TextManager.GetUIString("UIGuild29");
        GuildBuildInfo info = guildbuildinfo;

        if (guildbuildinfo.id == 1)           //公会大厅
        {
            //LoadSprite.LoaderImage(panel.build, "bg/qiuchang", false);          //建筑图片
            panel.rightname.text = TextManager.GetUIString("UIGuild24");
            GuildUpHall hallinfo = GuildUpHallConfig.GetGuildUpHall(info.level);
            panel.upinfo1.text    = "1:" + string.Format(TextManager.GetUIString("UI_GuildBuild4"), hallinfo.addNum);
            panel.upinfo2.text    = "2:" + string.Format(TextManager.GetUIString("UI_GuildBuild5"), hallinfo.reputation);
            panel.upinfo3.text    = "3:" + string.Format(TextManager.GetUIString("UI_GuildBuild6"), hallinfo.inspect);
            panel.nextLVneed.text = string.Format(TextManager.GetUIString("UI_GuildBuild0"), info.level);
            panel.consume.text    = hallinfo.needFunds.ToString();
            panel.needtime.text   = UtilTools.formatDuring(hallinfo.needTime * 60 * 60);
        }
        else if (guildbuildinfo.id == 2)    //公会商城
        {
            panel.rightname.text = TextManager.GetUIString("UIshop11");
            GuildUpShop shopinfo = GuildUpShopConfig.GetGuildUpShop(info.level);
            panel.upinfo1.text    = "1:" + TextManager.GetUIString("UI_GuildBuild13");
            panel.upinfo2.text    = "2:" + TextManager.GetUIString("UI_GuildBuild14");
            panel.upinfo3.text    = "";
            panel.nextLVneed.text = string.Format(TextManager.GetUIString("UI_GuildBuild0"), info.level);
            panel.consume.text    = shopinfo.needFunds.ToString();
            panel.needtime.text   = UtilTools.formatDuring(shopinfo.needTime * 60 * 60);
        }
        else if (guildbuildinfo.id == 3)    //顾问大厅
        {
            panel.rightname.text = TextManager.GetUIString("UIGuild23");
            GuildUpCounselor Counselorinfo = GuildUpCounselorConfig.GetGuildUpCounselor(info.level);
            panel.upinfo1.text    = "1:" + string.Format(TextManager.GetUIString("UI_GuildBuild1"), Counselorinfo.preSucc);
            panel.upinfo2.text    = "2:" + string.Format(TextManager.GetUIString("UI_GuildBuild2"), Counselorinfo.protectTime);
            panel.upinfo3.text    = "3:" + string.Format(TextManager.GetUIString("UI_GuildBuild3"), Counselorinfo.counselorNum);
            panel.nextLVneed.text = string.Format(TextManager.GetUIString("UI_GuildBuild0"), info.level);
            panel.consume.text    = Counselorinfo.needFunds.ToString();
            panel.needtime.text   = UtilTools.formatDuring(Counselorinfo.needTime * 60 * 60);
        }
        else if (guildbuildinfo.id == 4)    //任务大厅
        {
            panel.rightname.text = TextManager.GetUIString("UIGuild21");
            GuildUpTask taskinfo = GuildUpTaskConfig.GetGuildUpTask(info.level);
            panel.upinfo1.text    = "1:" + string.Format(TextManager.GetUIString("UI_GuildBuild7"), taskinfo.addNum);
            panel.upinfo2.text    = "2:" + string.Format(TextManager.GetUIString("UI_GuildBuild2"), taskinfo.openType);
            panel.upinfo3.text    = "";
            panel.nextLVneed.text = string.Format(TextManager.GetUIString("UI_GuildBuild0"), info.level);
            panel.consume.text    = taskinfo.needFunds.ToString();
            panel.needtime.text   = UtilTools.formatDuring(taskinfo.needTime * 60 * 60);
        }
    }
Exemplo n.º 2
0
    //获取升级需要时间
    public int GetNeedUpgradeTime(int buildID, int level)
    {
        int needTime = 0;

        if (buildID == 1)
        {
            needTime = GuildUpHallConfig.GetGuildUpHall(level).needTime;
        }
        else if (buildID == 2)
        {
            needTime = GuildUpShopConfig.GetGuildUpShop(level).needTime;
        }
        else if (buildID == 3)
        {
            needTime = GuildUpCounselorConfig.GetGuildUpCounselor(level).needTime;
        }
        else if (buildID == 4)
        {
            needTime = GuildUpTaskConfig.GetGuildUpTask(level).needTime;
        }

        return(needTime);
    }
Exemplo n.º 3
0
    //升级需要资金
    public int GetNeedFunds(int buildID, int level)
    {
        int money = 0;

        if (buildID == 1)
        {
            money = GuildUpHallConfig.GetGuildUpHall(level).needFunds;
        }
        else if (buildID == 2)
        {
            money = GuildUpShopConfig.GetGuildUpShop(level).needFunds;
        }
        else if (buildID == 3)
        {
            money = GuildUpCounselorConfig.GetGuildUpCounselor(level).needFunds;
        }
        else if (buildID == 4)
        {
            money = GuildUpTaskConfig.GetGuildUpTask(level).needFunds;
        }

        return(money);
    }