public void playGoddessSound(BeastEvolve chooseItem)
 {
     if (chooseItem.getBeast().uid != "")
     {
         int audioId = 401 + BeastEvolveManagerment.Instance.getBeastIndexBySid(chooseItem.getBeast().sid);
         if (audioSource.isPlaying)
         {
             stopMusic = true;
             StartCoroutine(Utils.DelayRun(() => {
                 PlayGoddessMusic(audioId);
             }, 1f));
         }
         else
         {
             StartCoroutine(Utils.DelayRun(() => {
                 PlayGoddessMusic(audioId);
             }, 1f));
         }
     }
     else
     {
         if (audioSource.isPlaying)
         {
             stopMusic = true;
         }
     }
 }
Exemple #2
0
    //检查前提条件 返回 如果都完成 则返回 全部达成 否则返回第一个没达成的条件
    public string checkPremises(BeastEvolve beast)
    {
        ExchangeSample exchange  = getExchangeBySids(beast.getNextBeast().sid);
        int            max       = exchange.premises.Length;
        string         nopremiss = "";
        int            flag      = 0;

        for (int i = 0; i < max; i++)
        {
            for (int j = 0; j < exchange.premises[i].Length; j++)
            {
                if (checkPremise(exchange.premises [i][j], beast) != "")
                {
                    if (nopremiss == "")
                    {
                        nopremiss = checkPremise(exchange.premises [i][j], beast);
                    }
                    flag += 1;
                    break;
                }
            }
        }
        if (flag == max)
        {
            return(nopremiss);
        }
        //return LanguageConfigManager.Instance.getLanguage ("s0106");
        return(LanguageConfigManager.Instance.getLanguage("nvShengJingHuaTips"));
    }
    public void updateBeast(BeastEvolve chooseItem)
    {
        if (chooseItem == null)
        {
            return;
        }

        if (iscacheAudioOK && AudioManager.Instance.IsAudioOpen)
        {
            playGoddessSound(chooseItem);
        }

        updateSelectedCard(chooseItem);
        changeButton();
        updateCondition(chooseItem);
        level.text = "Lv." + selectedCard.getLevel() + "/" + selectedCard.getMaxLevel();
        int  expSid = selectedCard.getEXPSid();
        long _exp   = selectedCard.getEXP();
        long nowExp = EXPSampleManager.Instance.getNowEXPShow(expSid, _exp);
        long maxExp = EXPSampleManager.Instance.getMaxEXPShow(expSid, _exp);

        expbar.updateValue(nowExp, maxExp);

        if (evolveCard != null && evolveCard.getEXP() > 0)
        {
            CardBaseAttribute oldAttr = CardManagerment.Instance.getCardWholeAttr(evolveCard);
            CardBaseAttribute newAttr = CardManagerment.Instance.getCardWholeAttr(selectedCard);
            hp.text     = oldAttr.getWholeHp().ToString();
            att.text    = oldAttr.getWholeAtt().ToString();
            def.text    = oldAttr.getWholeDEF().ToString();
            mag.text    = oldAttr.getWholeMAG().ToString();
            dex.text    = oldAttr.getWholeAGI().ToString();
            jinhua.text = (evolveCard.getQualityId() - 1).ToString() + "/4";
            hp.text    += "[64ED6E]" + " + " + (newAttr.getWholeHp() - oldAttr.getWholeHp()).ToString() + "[-]";
            att.text   += "[64ED6E]" + " + " + (newAttr.getWholeAtt() - oldAttr.getWholeAtt()).ToString() + "[-]";
            def.text   += "[64ED6E]" + " + " + (newAttr.getWholeDEF() - oldAttr.getWholeDEF()).ToString() + "[-]";
            mag.text   += "[64ED6E]" + " + " + (newAttr.getWholeMAG() - oldAttr.getWholeMAG()).ToString() + "[-]";
            dex.text   += "[64ED6E]" + " + " + (newAttr.getWholeAGI() - oldAttr.getWholeAGI()).ToString() + "[-]";
            evolveCard  = null;
        }
        else
        {
            CardBaseAttribute attr = CardManagerment.Instance.getCardWholeAttr(selectedCard);
            hp.text  = attr.getWholeHp().ToString();
            att.text = attr.getWholeAtt().ToString();
            def.text = attr.getWholeDEF().ToString();
            mag.text = attr.getWholeMAG().ToString();
            dex.text = attr.getWholeAGI().ToString();

            jinhua.text = (selectedCard.getQualityId() - 1).ToString() + "/4";
        }

        titleName = "horStar" + selectedCard.getTitleName(selectedCard.sid);
        setTitle(titleName, selectedCard.getName());
        quality.spriteName = QualityManagerment.qualityIDToStringByBG(selectedCard.getQualityId());
        quality.gameObject.SetActive(true);
        string str = LanguageConfigManager.Instance.getLanguage("s0371");

        InitSkill();
    }
Exemple #4
0
    //返回单个前提条件结果 如果为""表示已经完成 否则返回未达成说明文字

    public string checkPremise(ExchangePremise premise, BeastEvolve beast)
    {
        if (premise.type == PremiseType.LEVEL)
        {
            if (UserManager.Instance.self.getUserLevel() < premise._value)
            {
                return(premise.describe + LanguageConfigManager.Instance.getLanguage("s0099"));
            }
        }
        else if (premise.type == PremiseType.BSID_MAX)
        {
            if (beast == null)
            {
                return(premise.describe + LanguageConfigManager.Instance.getLanguage("s0099"));
            }
            else if (beast.getBeast().getLevel() < premise._value)
            {
                return(premise.describe + LanguageConfigManager.Instance.getLanguage("s0099"));
            }
        }
        else if (premise.type == PremiseType.PARENT)
        {
            if (!ExchangeManagerment.Instance.isParentComplete(premise._value))
            {
                return(premise.describe + LanguageConfigManager.Instance.getLanguage("s0099"));
            }
        }
        return("");
    }
Exemple #5
0
    public void Initialize(BeastEvolve beastEvo)
    {
        summonCardEvo   = beastEvo;
        cardImage.color = new Color(0.1f, 0.1f, 0.1f, 1);
        nextBeast       = summonCardEvo.getNextBeast();
        cardImage.gameObject.SetActive(true);
        ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH, nextBeast, cardImage);
        sample = beastEvo.getExchangeBySids(nextBeast.sid);
        int moneyNum = UserManager.Instance.self.getMoney();

        conditionButton.textLabel.text = beastEvo.checkPremises(summonCardEvo);

        int index = 0;

        foreach (ExchangeCondition each in sample.conditions[0])
        {
            if (each.costType == PrizeType.PRIZE_MONEY)
            {
                needMoney.text = each.num.ToString();
                userMoney.text = (moneyNum < each.num ? Colors.RED : "") + moneyNum;
                continue;
            }
            else
            {
                if (index >= buttons.Length)
                {
                    continue;
                }
                buttons [index].updateButton(each, ButtonExchange.BEASTSUMMON);
                index += 1;
            }
        }

        //前提条件是否达成
        if (!beastEvo.isCheckAllPremises(summonCardEvo))
        {
            changeButton(false);
            return;
        }

        //兑换条件是否达成
        if (!ExchangeManagerment.Instance.isCheckConditions(summonCardEvo.getExchangeBySids(nextBeast.sid)))
        {
            changeButton(false);
            return;
        }

        changeButton(true);
    }
    public void initWindowWirte(BeastEvolve selectedEvolv, int id)
    {
        beastEvolve = selectedEvolv;
        flag        = true;
        string iconId = "";

        if (CommandConfigManager.Instance.getNvShenClothType() == 0)
        {
            iconId = selectedEvolv.getBeast().getImageID() + "c";
        }
        else
        {
            iconId = selectedEvolv.getBeast().getImageID() + "";
        }
        ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId, iconTexure, (obj) => {
            flag             = true;
            GameObject frist = null;
            switch (id)
            {
            case 1:
                break;

            case 2:
                break;

            case 3:
                descLabel.gameObject.SetActive(false);
                StartCoroutine(Utils.DelayRun(() => {
                    iTween.ShakePosition(this.gameObject, iTween.Hash("amount", new Vector3(0.03f, 0.03f, 0.03f), "time", 0.4f));
                    iTween.ShakePosition(this.gameObject, iTween.Hash("amount", new Vector3(0.01f, 0.01f, 0.01f), "time", 0.4f));
                }, 0.5f));
                StartCoroutine(Utils.DelayRun(() => {
                    NGUITools.AddChild(faObj, openIceObj);
                }, 1.2f));
                StartCoroutine(Utils.DelayRun(() => {
                    bing.gameObject.SetActive(false);
                }, 2.5f));
                StartCoroutine(Utils.DelayRun(() => {
                    MaskWindow.UnlockUI();
                }, 2.5f));
                break;

            default:
                descLabel.text = LanguageConfigManager.Instance.getLanguage("GuideError_02");
                MaskWindow.UnlockUI();
                break;
            }
        });
    }
Exemple #7
0
    public void Initialize()
    {
        beastList = BeastEvolveManagerment.Instance.getAllBest();
        //init item

        foreach (GoddessContentItem tmp in goddessItems)
        {
            BeastEvolve be = null;
            be = beastList.Find((beast) => {
                if (beast.getBeast().getImageID() == StringKit.toInt(tmp.gameObject.name))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            });
            if (be != null)
            {
                //获取头像图标
                tmp.fatherWindow = this;
                tmp.beast        = be.getBeast();
                if (be.isAllExist())
                {
                    ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.GODDESS_HEAD2 + be.getBeast().getImageID() + "_h", tmp.headIcon);
                    tmp.headIcon.gameObject.SetActive(true);
                    tmp.emptyIcon.gameObject.SetActive(false);
                    tmp.evolutionIcon.gameObject.SetActive(true);
                    tmp.level.gameObject.SetActive(true);
                    tmp.evolutionIcon.spriteName = QualityManagerment.qualityIDToString(be.getBeast().getQualityId());
                    tmp.evolutionTimes.text      = be.getBeast().getQualityId().ToString();
                    tmp.level.text = "Lv." + be.getBeast().getLevel() + "/" + be.getBeast().getMaxLevel();
                    //获取品质图标
                    tmp.qualityIcon.spriteName = QualityManagerment.qualityIDToIconSpriteName(be.getBeast().getQualityId());
                }
            }
        }
        rushCombat();
        tipsGameObject.SetActive(checkShowTips());
        if (GuideManager.Instance.isEqualStep(16003000))
        {
            GuideManager.Instance.guideEvent();
        }
        //尝试执行友善指引
        GuideManager.Instance.doFriendlyGuideEvent();
    }
Exemple #8
0
    public void Initialize(BeastEvolve beastEvo)
    {
        string[][] str = beastEvo.getAllPremises(beastEvo);
        int        num = 0;

        for (int i = 0; i < str.Length; i++)
        {
            for (int j = 0; j < str[i].Length; j++)
            {
                if (i >= 5)
                {
                    continue;
                }
                conditionsLabel [num].text = str [i][j];
                num++;
            }
        }
    }
 /**显示兑换条件 */
 private void updateCondition(BeastEvolve chooseItem)
 {
     if (selectedCard.uid == "" && !(fatherWindow is TeamEditWindow))    //召唤
     {
         int        index = BeastEvolveManagerment.Instance.getBeastIndexBySid(chooseItem.getBeast().sid) + 1;
         Horoscopes hores = HoroscopesManager.Instance.getStarByType(index);
         conditonPoint.SetActive(true);
         combatPoint.SetActive(false);
         inofPoint.SetActive(false);
         //nvshengSprite.spriteName= "horStar"+selectedCard.getTitleName(selectedCard.sid);
         nvshengLabel.text        = hores.getName();
         nvshengDayLabel.text     = hores.getDate();
         nvshengLabel.effectStyle = UILabel.Effect.Outline;
         nvshengLabel.effectColor = new Color32(0, 1, 0, 255);
         nvshengLabel.color       = new Color32(0, 213, 255, 255);
         sample = selectedEvolve.getExchangeBySids(selectedEvolve.getNextBeast().sid);
         foreach (ExchangeCondition each in sample.conditions[0])
         {
             if (each.costType == PrizeType.PRIZE_MONEY)
             {
                 needMoneyLabel.text = each.num.ToString();
                 if (UserManager.Instance.self.getMoney() < each.num)
                 {
                     needMoneyLabel.text = Colors.RED + each.num.ToString();
                 }
             }
             else
             {
                 propButton.updateButton(each, ButtonExchange.BEASTSUMMON);
                 needPropNum = each.num;
                 break;
             }
         }
     }
     else          //进化
     {
         conditonPoint.SetActive(false);
         combatPoint.SetActive(true);
         inofPoint.SetActive(true);
     }
 }
    public void Initialize(BeastEvolve _selectedEvolve, long _exp)
    {
        selectedEvolve = _selectedEvolve;
        exp            = _exp;
        oldCard        = selectedEvolve.getBeast();
        if (!selectedEvolve.isEndBeast())
        {
            newCard = selectedEvolve.getNextBeast();
            newCard.updateExp(oldCard.getEXP());
        }
        else
        {
            newCard = oldCard;
        }

        showOldInfo();
        if (newCard != null)
        {
            showNewInfo();
        }
        showCondition();
    }
Exemple #11
0
    /** 进化列表中的所有召唤兽是否所有前提条件达成 */
    public bool isCheckAllPremises(BeastEvolve beast)
    {
        ExchangeSample exchange = getExchangeBySids(beast.getNextBeast().sid);
        int            max      = exchange.premises.Length;
        int            flag     = 0;

        for (int i = 0; i < max; i++)
        {
            for (int j = 0; j < exchange.premises[i].Length; j++)
            {
                if (checkPremise(exchange.premises [i][j], beast) != "")
                {
                    flag += 1;
                    break;
                }
            }
        }
        if (flag == max)
        {
            return(false);
        }
        return(true);
    }
Exemple #12
0
    //返回所有前提条件状态文字描述
    public string[][] getAllPremises(BeastEvolve beast)
    {
        ExchangeSample exchange = getExchangeBySids(beast.getNextBeast().sid);
        int            max      = exchange.premises.Length;

        string[][] strArr = new string[max][];
        for (int m = 0; m < exchange.premises.Length; m++)
        {
            strArr[m] = new string[exchange.premises[m].Length];
            for (int n = 0; n < exchange.premises[m].Length; n++)
            {
                if (checkPremise(exchange.premises [m][n], beast) == "")
                {
                    strArr [m][n] = Colors.GREEN + exchange.premises [m][n].describe + LanguageConfigManager.Instance.getLanguage("s0098");
                }
                else
                {
                    strArr [m][n] = checkPremise(exchange.premises [m][n], beast);
                }
            }
        }
        return(strArr);
    }
    //解析配置
    public override void parseConfig(string str)
    {
        BeastEvolve be = new BeastEvolve(str);

        list.Add(be);
    }
Exemple #14
0
    public void updateBeast(BeastEvolve evo)
    {
        beastEvo = evo;

        updateAll();
    }
Exemple #15
0
    /// <summary>
    /// 初始化信息
    /// </summary>
    /// <param name="_type">1卡片 2女神.</param>
    /// <param name="target">Target.</param>
    /// <param name="_newExp">_new exp.</param>
    /// <param name="_lv">_lv.</param>
    /// <param name="_combat">_combat.</param>
    public void init(int _type, CharacterCtrl target, int _newExp, int _lv, int _combat)
    {
        cardtype  = _type;
        expAdd    = 0;
        character = target;
        vipExpMax = _newExp;
        lv        = _lv;
        combat    = _combat;

        if (_type == TYPE_CARD)
        {
            expAdd += GuildManagerment.Instance.getSkillAddExpPorCardPve() * 0.01f;
        }
        else if (_type == TYPE_BEAST)
        {
            expAdd += GuildManagerment.Instance.getSkillAddExpPorBeastPve() * 0.01f;
        }

        if (UserManager.Instance.self.getVipLevel() > 0)
        {
            expAdd += VipManagerment.Instance.getVipbyLevel(UserManager.Instance.self.getVipLevel()).privilege.expAdd * 0.0001f;
            expMax  = (int)((float)_newExp / (1 + expAdd));
            stepVip = (int)((float)(_newExp - expMax) / (TextTime * 53));

            if (stepVip < 1)
            {
                stepVip = 1;
            }
        }
        else
        {
            expMax = vipExpMax;
        }
        step = (int)((float)expMax / (TextTime * 53));
        if (step < 1)
        {
            step = 1;
        }

        if (expMax == 0)
        {
            Card tmpCard = character.characterData.role;
            //达到自身等级上限(非主角等级限制)且未进化满10次的卡片在获得经验时飘字: 需进化
            if (tmpCard != null && !EvolutionManagerment.Instance.isMaxEvoLevel(tmpCard) && tmpCard.isMaxLevel())
            {
                label.text = LanguageConfigManager.Instance.getLanguage("Evo19");
            }
            //如果卡片确实已经达到了进化10次的上限,则飘字提示 已满级
            else if (tmpCard != null && EvolutionManagerment.Instance.isMaxEvoLevel(tmpCard) && tmpCard.isMaxLevel())
            {
                label.text = LanguageConfigManager.Instance.getLanguage("Evo20");
            }
            else if (tmpCard != null && cardtype == TYPE_BEAST)
            {
                BeastEvolve tmp = BeastEvolveManagerment.Instance.getBeastEvolveBySid(tmpCard.sid);//StorageManagerment.Instance.getBeast(tmpCard.uid);
                if (tmp.getBeast().isMaxLevel() && tmp.getBeast().getLevel() == 125)
                {
                    label.text = LanguageConfigManager.Instance.getLanguage("Evo20");
                }
                else if (tmp.getBeast().isMaxLevel() && tmp.getBeast().getLevel() != 125)
                {
                    label.text = LanguageConfigManager.Instance.getLanguage("Evo19");
                }
            }
        }
    }
    public void showUI()
    {
        switch (tapType)
        {
        case 0:
            if (info.isUse == 0)
            {
                useSprite.alpha = 0;
            }
            else
            {
                useSprite.alpha      = 1;
                useSprite.spriteName = "text_share";
            }
            showItem.GetComponent <BoxCollider>().enabled = false;

            string sidOne = "";
            if (showType != FriendsShareManagerment.TYPE_JINHUA)
            {
                sidOne = info.sid.getValueString();
            }
            switch (showType)
            {
            case FriendsShareManagerment.TYPE_CARD:
                showItem.GetComponent <BoxCollider>().enabled = true;
                showItem.info = info;
                Card   card        = CardManagerment.Instance.createCard(StringKit.toInt(sidOne));
                string quilityCard = QualityManagerment.getQualityName(card.getQualityId()) + "[-]";
                string nameCard    = QualityManagerment.getQualityColor(card.getQualityId()) + card.getName() + "[-]";
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, quilityCard, nameCard);
                break;

            case FriendsShareManagerment.TYPE_EQUIP:
                showItem.GetComponent <BoxCollider>().enabled = true;
                showItem.info = info;
                Equip  equip        = EquipManagerment.Instance.createEquip(StringKit.toInt(sidOne));
                string quilityEquip = QualityManagerment.getQualityName(equip.getQualityId()) + "[-]";
                string nameEquip    = QualityManagerment.getQualityColor(equip.getQualityId()) + equip.getName() + "[-]";
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, quilityEquip, nameEquip);
                break;

            case FriendsShareManagerment.TYPE_MAGICWEAPON:
                showItem.GetComponent <BoxCollider>().enabled = true;
                showItem.info = info;
                MagicWeapon mw        = MagicWeaponManagerment.Instance.createMagicWeapon(StringKit.toInt(sidOne));
                string      quilitymw = QualityManagerment.getQualityName(mw.getMagicWeaponQuality()) + "[-]";
                string      namemw    = QualityManagerment.getQualityColor(mw.getMagicWeaponQuality()) + mw.getName() + "[-]";
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, quilitymw, namemw);
                break;

            case FriendsShareManagerment.TYPE_XIULIAN:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne);
                break;

            case FriendsShareManagerment.TYPE_TAOFA:
                Mission mss = MissionInfoManager.Instance.getMissionBySid(StringKit.toInt(sidOne));
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, mss.getMissionName());
                break;

            case FriendsShareManagerment.TYPE_JUQING:
                Mission       mssJq     = MissionInfoManager.Instance.getMissionBySid(StringKit.toInt(sidOne));
                ChapterSample chapterJq = ChapterSampleManager.Instance.getChapterSampleBySid(mssJq.getChapterSid());
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, chapterJq.name);
                break;

            case FriendsShareManagerment.TYPE_PVP:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne);
                break;

            case FriendsShareManagerment.TYPE_SHENGQI:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne);
                break;

            case FriendsShareManagerment.TYPE_XINGPAN:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne);
                break;

            case FriendsShareManagerment.TYPE_JINHUA:
                showItem.GetComponent <BoxCollider>().enabled = true;
                showItem.info = info;
//				Card cardJinhua = CardManagerment.Instance.createCard(StringKit.toInt(sid));
                ServerCardMsg cardServer     = CardManagerment.Instance.createCardByChatServer(info.sid as ErlArray);
                string        nameCardJinhua = QualityManagerment.getQualityColor(cardServer.card.getQualityId()) + cardServer.card.getName() + "[-]";
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, nameCardJinhua);
                break;

            case FriendsShareManagerment.TYPE_SHENGJI:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne);
                break;

            case FriendsShareManagerment.TYPE_NVSHEN:
                Card   cardNvshen = CardManagerment.Instance.createCard(StringKit.toInt(sidOne));
                string nvshenName = QualityManagerment.getQualityColor(cardNvshen.getQualityId()) + cardNvshen.getName() + "[-]";
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, nvshenName);
                break;

            case FriendsShareManagerment.TYPE_TUPO:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType);
                break;

            case FriendsShareManagerment.TYPE_YXZHIZHANG:
                MissionSample mission = MissionSampleManager.Instance.getMissionSampleBySid(StringKit.toInt(sidOne));
                ChapterSample chsam   = ChapterSampleManager.Instance.getChapterSampleBySid(mission.chapterSid);
                int           gc      = StringKit.toInt(sidOne) - chsam.missions[0] + 1;
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, mission.name, gc.ToString());
                break;

            case FriendsShareManagerment.TYPE_JWTISHENG:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, KnighthoodConfigManager.Instance.getKnighthoodByGrade(StringKit.toInt(info.sid.getValueString().ToString())).kName);
                break;

            case FriendsShareManagerment.TYPE_XINGHUN:
                StarSoulSample sample     = StarSoulSampleManager.Instance.getStarSoulSampleBySid(StringKit.toInt(sidOne));
                string         sampleName = QualityManagerment.getQualityColor(sample.qualityId) + sample.name + "[-]";
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sampleName);
                break;

            case FriendsShareManagerment.TYPE_ZUOQI:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, MountsManagerment.Instance.createMounts(StringKit.toInt(sidOne)).getName());
                break;

            case FriendsShareManagerment.TYPE_VIP:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, UserManager.Instance.self.nickname, sidOne);
                break;

            case FriendsShareManagerment.TYPE_LADDER:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne);
                break;

            case FriendsShareManagerment.TYPE_ARENA:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne);
                break;

            case FriendsShareManagerment.TYPE_JINGCAI:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType);
                break;

            case FriendsShareManagerment.TYPE_BEAST:
                //showItem.GetComponent<BoxCollider>().enabled = true;
                //showItem.info = info;
                BeastEvolve beast     = BeastEvolveManagerment.Instance.getBeastEvolveBySid(StringKit.toInt(sidOne));
                string      beastName = QualityManagerment.getQualityColor(beast.getBeast().getQualityId()) + beast.getBeast().getName() + "[-]";
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, beastName);
                break;

            case FriendsShareManagerment.TYPE_QISHU:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne);
                break;
            }
            break;

        case 1:
            CardSample cs;
            if (info.isUse == 0)
            {
                useSprite.alpha = 0;
            }
            else
            {
                useSprite.alpha      = 1;
                useSprite.spriteName = "text_applaud";
            }
            string name = info.name;
            string vip1 = info.vip;
            string vip  = "";
            if (vip1 == "0")
            {
                vip = "";
            }
            else
            {
                vip = "<VIP" + vip1 + ">";
            }
            DateTime dt   = TimeKit.getDateTime(StringKit.toInt(info.time));
            string   time = "[" + dt.Hour + ":" + dt.Minute + "]";
            showItem.GetComponent <BoxCollider>().enabled = false;

            string sidTwo = "";
            if (showType != FriendsShareManagerment.TYPE_JINHUA)
            {
                sidTwo = info.sid.getValueString();
            }
            switch (info.type)
            {
            case FriendsShareManagerment.TYPE_CARD:
                showItem.GetComponent <BoxCollider>().enabled = true;
                showItem.info = info;
                cs            = CardSampleManager.Instance.getRoleSampleBySid(StringKit.toInt(sidTwo));
                if (cs == null)
                {
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, "[-]", sidTwo);
                    break;
                }
                else
                {
                    Card   card        = CardManagerment.Instance.createCard(StringKit.toInt(sidTwo));
                    string quilityCard = QualityManagerment.getQualityName(card.getQualityId()) + "[-]";
                    string nameCard    = QualityManagerment.getQualityColor(card.getQualityId()) + card.getName() + "[-]";
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, quilityCard, nameCard);
                    break;
                }

            case FriendsShareManagerment.TYPE_EQUIP:
                showItem.GetComponent <BoxCollider>().enabled = true;
                showItem.info = info;
                if (EquipmentSampleManager.Instance.getEquipSampleBySid(StringKit.toInt(sidTwo)) == null)
                {
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, "[-]", sidTwo);
                    break;
                }
                else
                {
                    Equip  equip        = EquipManagerment.Instance.createEquip(StringKit.toInt(sidTwo));
                    string quilityEquip = QualityManagerment.getQualityName(equip.getQualityId()) + "[-]";
                    string nameEquip    = QualityManagerment.getQualityColor(equip.getQualityId()) + equip.getName() + "[-]";
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, quilityEquip, nameEquip);
                    break;
                }

            case FriendsShareManagerment.TYPE_MAGICWEAPON:
                showItem.GetComponent <BoxCollider>().enabled = true;
                showItem.info = info;
                if (MagicWeaponManagerment.Instance.createMagicWeapon(StringKit.toInt(sidTwo)) == null)
                {
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, "[-]", sidTwo);
                    break;
                }
                else
                {
                    MagicWeapon equip        = MagicWeaponManagerment.Instance.createMagicWeapon(StringKit.toInt(sidTwo));
                    string      quilityMagic = QualityManagerment.getQualityName(equip.getMagicWeaponQuality()) + "[-]";
                    string      nameMagic    = QualityManagerment.getQualityColor(equip.getMagicWeaponQuality()) + equip.getName() + "[-]";
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, time, quilityMagic, nameMagic);
                    break;
                }

            case FriendsShareManagerment.TYPE_XIULIAN:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, sidTwo);
                break;

            case FriendsShareManagerment.TYPE_TAOFA:
                if (MissionSampleManager.Instance.getMissionSampleBySid(StringKit.toInt(sidTwo)) == null)
                {
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, sidTwo);
                    break;
                }
                else
                {
                    Mission mss = MissionInfoManager.Instance.getMissionBySid(StringKit.toInt(sidTwo));
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, mss.getMissionName());
                    break;
                }

            case FriendsShareManagerment.TYPE_JUQING:
                if (MissionSampleManager.Instance.getMissionSampleBySid(StringKit.toInt(sidTwo)) == null)
                {
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, sidTwo);
                    break;
                }
                else
                {
                    Mission mssJuqing = MissionInfoManager.Instance.getMissionBySid(StringKit.toInt(sidTwo));
                    if (ChapterSampleManager.Instance.getChapterSampleBySid(mssJuqing.getChapterSid()) == null)
                    {
                        showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, sidTwo);
                        break;
                    }
                    else
                    {
                        ChapterSample chapterJq = ChapterSampleManager.Instance.getChapterSampleBySid(mssJuqing.getChapterSid());
                        showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, chapterJq.name);
                        break;
                    }
                }

            case FriendsShareManagerment.TYPE_PVP:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo);
                break;

            case FriendsShareManagerment.TYPE_SHENGQI:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo);
                break;

            case FriendsShareManagerment.TYPE_XINGPAN:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo);
                break;

            case FriendsShareManagerment.TYPE_JINHUA:
                showItem.GetComponent <BoxCollider>().enabled = true;
                showItem.info = info;
//				Card cardJinhua = CardManagerment.Instance.createCard(StringKit.toInt(sidTwo));
                ServerCardMsg cardServer     = CardManagerment.Instance.createCardByChatServer(info.sid as ErlArray);
                string        nameCardJinhua = QualityManagerment.getQualityColor(cardServer.card.getQualityId()) + cardServer.card.getName() + "[-]";
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, nameCardJinhua);
                break;

            case FriendsShareManagerment.TYPE_SHENGJI:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo);
                break;

            case FriendsShareManagerment.TYPE_NVSHEN:
                cs = CardSampleManager.Instance.getRoleSampleBySid(StringKit.toInt(sidTwo));
                if (cs == null)
                {
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo);
                    break;
                }
                else
                {
                    Card   cardNvshen = CardManagerment.Instance.createCard(StringKit.toInt(sidTwo));
                    string nvshenName = QualityManagerment.getQualityColor(cardNvshen.getQualityId()) + cardNvshen.getName() + "[-]";
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, nvshenName);
                    break;
                }

            case FriendsShareManagerment.TYPE_TUPO:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip);
                break;

            case FriendsShareManagerment.TYPE_YXZHIZHANG:
                MissionSample mission = MissionSampleManager.Instance.getMissionSampleBySid(StringKit.toInt(sidTwo));
                if (mission == null)
                {
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo, sidTwo);
                    break;
                }
                ChapterSample chsam = ChapterSampleManager.Instance.getChapterSampleBySid(mission.chapterSid);
                if (chsam == null)
                {
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, mission.name, sidTwo);
                    break;
                }
                int gc = StringKit.toInt(sidTwo) - chsam.missions[0] + 1;
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, mission.name, gc.ToString());
                break;

            case FriendsShareManagerment.TYPE_JWTISHENG:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip);
                break;

            case FriendsShareManagerment.TYPE_XINGHUN:
                StarSoulSample sample     = StarSoulSampleManager.Instance.getStarSoulSampleBySid(StringKit.toInt(sidTwo));
                string         sampleName = QualityManagerment.getQualityColor(sample.qualityId) + sample.name + "[-]";
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sampleName);
                break;

            case FriendsShareManagerment.TYPE_ZUOQI:
                if (MountsSampleManager.Instance.getMountsSampleBySid(StringKit.toInt(sidTwo)) == null)
                {
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo);
                    break;
                }
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, MountsManagerment.Instance.createMounts(StringKit.toInt(sidTwo)).getName());
                break;

            case FriendsShareManagerment.TYPE_VIP:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip);
                break;

            case FriendsShareManagerment.TYPE_LADDER:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip);
                break;

            case FriendsShareManagerment.TYPE_ARENA:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo);
                break;

            case FriendsShareManagerment.TYPE_JINGCAI:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip);
                break;

            case FriendsShareManagerment.TYPE_BEAST:
                BeastEvolve beast = BeastEvolveManagerment.Instance.getBeastEvolveBySid(StringKit.toInt(sidTwo));
                if (beast == null)
                {
                    showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo);
                    break;
                }
                string beastName = QualityManagerment.getQualityColor(beast.getBeast().getQualityId()) + beast.getBeast().getName() + "[-]";
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, beastName);
                break;

            case FriendsShareManagerment.TYPE_QISHU:
                showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo);
                break;
            }
            break;
        }
    }
 public void initButton(BeastEvolve _beast)
 {
     beast = _beast;
 }
    private void setDecForInfo(Award award)
    {
        if (award == null)
        {
            return;
        }
        //CharacterData tempGuardianForce = BattleManager.battleData.playerTeamInfo.guardianForce;//召唤兽
        int    cardExp      = 0;
        int    beastExp     = 0;
        string beastExpDesc = "";

        if (award.exps != null)
        {
            if (BattleManager.battleData.playerTeamInfo.guardianForce != null)
            {
                for (int i = 0; i < award.exps.Count; i++)
                {
                    if (BattleManager.battleData.playerTeamInfo.guardianForce.uid == award.exps[i].id)
                    {
                        BeastEvolve tmp =
                            BeastEvolveManagerment.Instance.getBeastEvolveBySid(
                                BattleManager.battleData.playerTeamInfo.guardianForce.sid);
                        if (!tmp.getBeast().isMaxLevel())
                        {
                            beastExp = award.exps[i].expGap;
                        }
                        else if (tmp.getBeast().isMaxLevel() && tmp.getBeast().getLevel() != 125)
                        {
                            beastExpDesc = LanguageConfigManager.Instance.getLanguage("Evo19");
                        }
                        else if (tmp.getBeast().isMaxLevel() && tmp.getBeast().getLevel() == 125)
                        {
                            beastExpDesc = LanguageConfigManager.Instance.getLanguage("Evo20");
                        }
                    }
                    else if (cardExp == 0 && award.exps[i].expGap > 0)
                    {
                        cardExp = award.exps[i].expGap;
                    }
                }
            }
            else
            {
                for (int i = 0; i < award.exps.Count; i++)
                {
                    if (cardExp == 0 && award.exps[i].expGap > 0)
                    {
                        cardExp = award.exps[i].expGap;
                    }
                }
                //cardExp = award.exps[0].expGap;
            }
        }
        if (cardExp != 0)
        {
            float expAdd = 0;
            expAdd += GuildManagerment.Instance.getSkillAddExpPorCardPve() * 0.01f;
            if (UserManager.Instance.self.getVipLevel() > 0)
            {
                expAdd +=
                    VipManagerment.Instance.getVipbyLevel(UserManager.Instance.self.getVipLevel()).privilege.expAdd *
                    0.0001f;
            }
            if (ServerTimeKit.getSecondTime() < BackPrizeLoginInfo.Instance.endTimes) // 双倍经验期间//
            {
                careDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gavee", cardExp + "",
                                                                     2 + expAdd + "");
                //LanguageConfigManager.Instance.getLanguage("EXPADD") + (2 + expAdd);
            }
            else
            {
                if (expAdd == 0)
                {
                    careDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gave", cardExp + "");
                }
                else
                {
                    careDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gavee", cardExp + "",
                                                                         1 + expAdd + "");
                }
            }
        }
        if (beastExp != 0)
        {
            float expA = 0;
            expA += GuildManagerment.Instance.getSkillAddExpPorBeastPve() * 0.01f;
            if (UserManager.Instance.self.getVipLevel() > 0)
            {
                expA = VipManagerment.Instance.getVipbyLevel(UserManager.Instance.self.getVipLevel()).privilege.expAdd *
                       0.0001f;
            }
            if (ServerTimeKit.getSecondTime() < BackPrizeLoginInfo.Instance.endTimes) // 双倍经验期间//
            {
                beastDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gavee_nv1", beastExp + "",
                                                                      2 + expA + "");
                //LanguageConfigManager.Instance.getLanguage("EXPADD") + (2 + expAdd);
            }
            else
            {
                if (expA == 0)
                {
                    beastDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gavee_nv", beastExp + "");
                }
                else
                {
                    beastDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gavee_nv1", beastExp + "",
                                                                          1 + expA + "");
                }
            }
        }
        else
        {
            if (BattleManager.battleData.playerTeamInfo.guardianForce == null)
            {
                beastDec = "";
            }
            else
            {
                beastDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gavee_nvShen", beastExpDesc);
            }
        }
    }
 public void updateSelectedCard(BeastEvolve evo)
 {
     selectedEvolve = evo;
     selectedCard   = selectedEvolve.getBeast();
 }
Exemple #20
0
    //进场
    private void walkOn(int loction, int intoLoc, string name, int iconId)
    {
        talks [loction - 1].image.mainTexture = null;

        //无图无真相
        if (iconId == 0)
        {
            talks [loction - 1].image.gameObject.SetActive(false);
            talks [loction - 1].image.height = 512;
            talks [loction - 1].image.width  = 512;
        }
        //玩家
        else if (iconId == -1)
        {
            talks [loction - 1].image.gameObject.SetActive(true);
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + StorageManagerment.Instance.getRole(UserManager.Instance.self.mainCardUid).getImageID(), talks [loction - 1].image);
            talks [loction - 1].image.height = 512;
            talks [loction - 1].image.width  = 512;
        }
        //女神2050-2061
        else if (iconId >= 2050 && iconId <= 2061)
        {
            BeastEvolveManagerment instance = BeastEvolveManagerment.Instance;
            int         beastIndex          = instance.getBeastIndexByImageId(iconId) - 1;
            BeastEvolve be = instance.getBeastEvolveByIndex(beastIndex);
            talks [loction - 1].image.gameObject.SetActive(true);
            if (be != null && be.getBeast().getQualityId() > 1)
            {
                ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId + "c", talks [loction - 1].image);
            }
            else
            {
                if (CommandConfigManager.Instance.getNvShenClothType() == 0)
                {
                    ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId + "c", talks [loction - 1].image);
                }
                else
                {
                    ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId, talks[loction - 1].image);
                }
            }

            talks [loction - 1].image.height = 1024;
            talks [loction - 1].image.width  = 1024;
            talks [loction - 1].image.transform.localPosition = new Vector2(35, 200);
        }
        //我的星座女神-2
        else if (iconId == -2)
        {
            talks [loction - 1].image.gameObject.SetActive(true);
            if (UserManager.Instance.self != null && UserManager.Instance.self.star != 0)
            {
                if (CommandConfigManager.Instance.getNvShenClothType() == 0)
                {
                    ResourcesManager.Instance.LoadAssetBundleTexture(
                        ResourcesManager.CARDIMAGEPATH +
                        HoroscopesManager.Instance.getStarByType(UserManager.Instance.self.star).getImageID() + "c",
                        talks[loction - 1].image);
                }
                else
                {
                    ResourcesManager.Instance.LoadAssetBundleTexture(
                        ResourcesManager.CARDIMAGEPATH +
                        HoroscopesManager.Instance.getStarByType(UserManager.Instance.self.star).getImageID(),
                        talks[loction - 1].image);
                }
            }
            else
            {
                if (CommandConfigManager.Instance.getNvShenClothType() == 0)
                {
                    ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId + "c",
                                                                     talks[loction - 1].image);
                }
                else
                {
                    ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId,
                                                                     talks[loction - 1].image);
                }
            }
            talks [loction - 1].image.height = 1024;
            talks [loction - 1].image.width  = 1024;
            talks [loction - 1].image.transform.localPosition = new Vector2(35, 200);
        }
        else
        {
            talks [loction - 1].image.gameObject.SetActive(true);
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId, talks [loction - 1].image);
            talks [loction - 1].image.height = 512;
            talks [loction - 1].image.width  = 512;
        }

        location [loction - 1]    = 1;
        talkerNames [loction - 1] = name;
        talks [loction - 1].talkIn(intoLoc);

        if (iconId == -1)        //玩家
        {
            talks [loction - 1].talkerName.text = getName(name);
        }
        else if (iconId >= 2050 && iconId <= 2061)        //女神
        {
            talks [loction - 1].talkerName.text = HoroscopesManager.Instance.getStarByType(BeastEvolveManagerment.Instance.getBeastIndexByImageId(iconId)).getName()
                                                  + LanguageConfigManager.Instance.getLanguage("goddess");
        }
        else if (iconId == -2)        //我的星座女神-2
        {
            if (UserManager.Instance.self != null && UserManager.Instance.self.star != 0)
            {
                talks [loction - 1].talkerName.text = HoroscopesManager.Instance.getStarByType(UserManager.Instance.self.star).getName() + LanguageConfigManager.Instance.getLanguage("goddess");
            }
            else
            {
                talks [loction - 1].talkerName.text = name;
            }
        }
        else
        {
            talks [loction - 1].talkerName.text = name;
        }

        StartCoroutine("printer", 0);
        activeTalk = talks [loction - 1];
    }