Exemplo n.º 1
0
    private int SortByCustomType(Transform a, Transform b)
    {
        GuildGoddnessText guildGoddnessText1 = a.GetComponent <GuildGoddnessText>();

        if (guildGoddnessText1 == null)
        {
            return(0);
        }

        GuildGoddnessText guildGoddnessText2 = b.GetComponent <GuildGoddnessText>();

        if (guildGoddnessText2 == null)
        {
            return(0);
        }

        return(guildGoddnessText1.TextType.CompareTo(guildGoddnessText2.TextType));
    }
Exemplo n.º 2
0
    private TributeData SetTributeText(DATA_GUILD_TRIBUTE._enTributeEnum TributeEnum, Transform TributeInfoGrid)
    {
        DATA_GUILD_TRIBUTE GuildTributeData = CDATA_GUILD_TRIBUTE.Get(TributeEnum);

        if (GuildTributeData == null)
        {
            return(null);     // error
        }
        TributeData tributeData = new TributeData();

        tributeData._PriceType         = GuildTributeData.enPriceType;
        tributeData._Price             = GuildTributeData.iPriceValue;
        tributeData._GoddnessSprite    = UIResourceMgr.CreateSprite(BUNDLELIST.TEXTURE_ICON_GODDNESS, GuildTributeData.sTributeObj);
        tributeData._TributeButtonText = StringTableManager.GetData(GuildTributeData.iTributeTitle);

        if (GuildTributeData.iGexp > 0)
        {
            GuildGoddnessText GuildExpText = UIResourceMgr.CreatePrefab <GuildGoddnessText>(BUNDLELIST.PREFABS_UI_GUILD, TributeInfoGrid, _GuildGoddnessText);
            GuildExpText.SetText(string.Format(StringTableManager.GetData(6889), GuildTributeData.iGexp), GuildGoddnessText.enGuildGoddnessText_Type.GuildExp); // 6889    길드 경험치 +{0}

            _GuildGoddnessTextList.Add(GuildExpText);

            GuildGoddnessText GuildContributionText = UIResourceMgr.CreatePrefab <GuildGoddnessText>(BUNDLELIST.PREFABS_UI_GUILD, TributeInfoGrid, _GuildGoddnessText);
            GuildContributionText.SetText(string.Format("{0} +{1}", StringTableManager.GetData(6905), GuildTributeData.iGexp), GuildGoddnessText.enGuildGoddnessText_Type.GuildContribution); // 6905	기여도

            _GuildGoddnessTextList.Add(GuildContributionText);
        }

        float Percent = 0.0f;

        if (GuildTributeData.fbuff_Gold > 0)
        {
            Percent = (GuildTributeData.fbuff_Gold * 100);
            GuildGoddnessText BuffGoldText = UIResourceMgr.CreatePrefab <GuildGoddnessText>(BUNDLELIST.PREFABS_UI_GUILD, TributeInfoGrid, _GuildGoddnessText);
            BuffGoldText.SetText(string.Format(StringTableManager.GetData(6890), Percent.ToString("F2")), GuildGoddnessText.enGuildGoddnessText_Type.BuffGold); // 6890    획득 골드 +{0}%

            _GuildGoddnessTextList.Add(BuffGoldText);
        }

        // 기획팀 제거요청.
        //if (GuildTributeData.fbuff_Pexp > 0)
        //{
        //    Percent = (GuildTributeData.fbuff_Pexp * 100);
        //    GuildGoddnessText BuffUserExpPercentText = UIResourceMgr.CreatePrefab<GuildGoddnessText>(BUNDLELIST.PREFABS_UI_GUILD, TributeInfoGrid, _GuildGoddnessText);
        //    BuffUserExpPercentText.SetText(string.Format(StringTableManager.GetData(6891), Percent.ToString("F2")), GuildGoddnessText.enGuildGoddnessText_Type.BuffUserExpPercent); // 6891    획득 플레이어 경험치 +{0}%

        //    _GuildGoddnessTextList.Add(BuffUserExpPercentText);
        //}


        if (GuildTributeData.fbuff_Cexp > 0)
        {
            Percent = (GuildTributeData.fbuff_Cexp * 100);
            GuildGoddnessText BuffCreatureExpPercentText = UIResourceMgr.CreatePrefab <GuildGoddnessText>(BUNDLELIST.PREFABS_UI_GUILD, TributeInfoGrid, _GuildGoddnessText);
            BuffCreatureExpPercentText.SetText(string.Format(StringTableManager.GetData(6892), Percent.ToString("F2")), GuildGoddnessText.enGuildGoddnessText_Type.BuffCreatureExpPercent); // 6892    획득 크리쳐 경험치 +{0}%

            _GuildGoddnessTextList.Add(BuffCreatureExpPercentText);
        }

        // 기획팀 제거요청.
        //if (GuildTributeData.iDuration > 0)
        //{
        //    GuildGoddnessText BuffDurationText = UIResourceMgr.CreatePrefab<GuildGoddnessText>(BUNDLELIST.PREFABS_UI_GUILD, TributeInfoGrid, _GuildGoddnessText);
        //    BuffDurationText.SetText(string.Format(StringTableManager.GetData(6897), GuildTributeData.iDuration), GuildGoddnessText.enGuildGoddnessText_Type.BuffDuration);       // 6897    가호 지속시간 : {0}분

        //    _GuildGoddnessTextList.Add(BuffDurationText);
        //}

        if (GuildTributeData.iKeyAmount > 0)
        {
            GuildGoddnessText GuildRewardKeyText = UIResourceMgr.CreatePrefab <GuildGoddnessText>(BUNDLELIST.PREFABS_UI_GUILD, TributeInfoGrid, _GuildGoddnessText);
            GuildRewardKeyText.SetText(string.Format(StringTableManager.GetData(8799), GuildTributeData.iKeyAmount), GuildGoddnessText.enGuildGoddnessText_Type.BuffRewardKey); //

            _GuildGoddnessTextList.Add(GuildRewardKeyText);
        }

        return(tributeData);
    }