/** 初始化道具 */
    public void initPropButton(GameObject gameObj, Prop prop, int index)
    {
        GameObject obj = NGUITools.AddChild(gameObj, goodsViewPrefab);

        obj.transform.localScale = new Vector3(1.4f, 1.4f, 1);
        GoodsView goods = obj.GetComponent <GoodsView> ();

        goods.fatherWindow = this;
        goods.linkQualityEffectPoint();
        goods.init(prop, 0);
        goods.onClickCallback = () => {
            UiManager.Instance.openDialogWindow <PropAttrWindow>((win) => {
                win.Initialize(prop);
            });
        };
        if (cardName != null)
        {
            string color = QualityManagerment.getQualityColor(prop.getQualityId());
            cardName.text = color + prop.getName() + "[-]";
            GameObject card_name = NGUITools.AddChild(obj, cardName.gameObject);
            card_name.transform.localScale    = new Vector3(0.8f, 0.8f, 1);
            card_name.transform.localPosition = new Vector3(0, -70, 0);
            card_name.SetActive(true);
        }
    }
    /** 初始化秘宝 */
    public void initMagicWeaponButton(GameObject gameObj, MagicWeapon magicWeap, int index)
    {
        GameObject obj = NGUITools.AddChild(gameObj, goodsViewPrefab);

        obj.transform.localScale = new Vector3(1.4f, 1.4f, 1);
        GoodsView goods = obj.GetComponent <GoodsView>();

        goods.fatherWindow = this;
        goods.linkQualityEffectPoint();
        goods.init(magicWeap);
        goods.onClickCallback = goods.DefaultClickEvent;
        //goods.onClickCallback = () => {
        //    TweenAlpha lname = TweenAlpha.Begin(gameObject, 1f, 0);
        //    lname.from = 1;
        //    UiManager.Instance.openWindow<MagicWeaponStrengWindow>((win) => {
        //        win.Initialize(magicWeap, EquipAttrWindow.OTHER, () => {
        //            lname = TweenAlpha.Begin(gameObject, 1.5f, 1);
        //            lname.from = 0;
        //        });
        //    });
        //};
        if (cardName != null)
        {
            string color = QualityManagerment.getQualityColor(magicWeap.getMagicWeaponQuality());
            cardName.text = color + magicWeap.getName() + "[-]";
            GameObject card_name = NGUITools.AddChild(obj, cardName.gameObject);
            card_name.transform.localScale    = new Vector3(0.8f, 0.8f, 1);
            card_name.transform.localPosition = new Vector3(0, -70, 0);
            card_name.SetActive(true);
        }
    }
    /** 初始化装备 */
    public void initEquipButton(GameObject gameObj, Equip equip, int index)
    {
        GameObject obj = NGUITools.AddChild(gameObj, goodsViewPrefab);

        obj.transform.localScale = new Vector3(1.4f, 1.4f, 1);
        GoodsView goods = obj.GetComponent <GoodsView> ();

        goods.fatherWindow = this;
        goods.linkQualityEffectPoint();
        goods.init(equip, 0);
        goods.onClickCallback = () => {
            TweenAlpha lname = TweenAlpha.Begin(gameObject, 1f, 0);
            lname.from = 1;
            UiManager.Instance.openWindow <EquipAttrWindow> ((winEquip) => {
                winEquip.Initialize(equip, EquipAttrWindow.OTHER, () => {
                    lname      = TweenAlpha.Begin(gameObject, 1.5f, 1);
                    lname.from = 0;
                });
            });
        };
        if (cardName != null)
        {
            string color = QualityManagerment.getQualityColor(equip.getQualityId());
            cardName.text = color + equip.getName() + "[-]";
            GameObject card_name = NGUITools.AddChild(obj, cardName.gameObject);
            card_name.transform.localScale    = new Vector3(0.8f, 0.8f, 1);
            card_name.transform.localPosition = new Vector3(0, -70, 0);
            card_name.SetActive(true);
        }
    }
Esempio n. 4
0
    void InitSkill()
    {
        oldExp      = BeastEvolveManagerment.Instance.getHallowExp();
        day         = BeastEvolveManagerment.Instance.getHallowDay();
        count       = BeastEvolveManagerment.Instance.getHallowCount();
        mainSkillLv = BeastEvolveManagerment.Instance.getSkillLv();

        Skill[] mSkill = selectedCard.getSkills();
        if (mSkill == null || mSkill [0] == null)
        {
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.SKILLIMAGEPATH + "Skill_Null", mainSkillIcon);
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.SKILLIMAGEPATH + "Skill_Null", featuresIcon);
            return;
        }
        if (mainSkillLv == 0)
        {
            mainSkillLv = 1;
        }
        if (mainSkillLv >= mSkill [0].getMaxLevel())
        {
            mainSkillLv = mSkill [0].getMaxLevel();
        }
        ResourcesManager.Instance.LoadAssetBundleTexture(mSkill [0].getIcon(), mainSkillIcon);
        ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.SKILLIMAGEPATH + "Skill_Passive", featuresIcon);
        mainSkillLevel.text    = "Lv." + mainSkillLv;
        mainSkillDescript.text = mSkill [0].getDescribeByLv(mainSkillLv);
        mainSkill.text         = (selectedCard.getQualityId() == 1 ? "[FFFFFF]" : QualityManagerment.getQualityColor(selectedCard.getQualityId())) + mSkill [0].getName();

        featuresText.text     = (selectedCard.getQualityId() == 1 ? "[FFFFFF]" : QualityManagerment.getQualityColor(selectedCard.getQualityId())) + selectedCard.getFeatures() [0];
        featuresDescript.text = selectedCard.getFeatures() [1];

        rushCombat();
    }
Esempio n. 5
0
    private ExchangeSample magicExSamle; //神器兑换模板

    public void init(Exchange ex)
    {
        ExchangeSample sample = ex.getExchangeSample();

        this.magicExSamle = sample;
        //按钮显示判断
        int count = ExchangeManagerment.Instance.getCanExchangeNum(ex);

        if (count <= 0)
        {
            buttonExchange.disableButton(true);
        }
        else
        {
            buttonExchange.disableButton(false);
        }
        //数量9240c
        numLabel.text = "[92400c]" + LanguageConfigManager.Instance.getLanguage("store03") + "[-]" + EquipScrapManagerment.Instance.getNumString(sample);
        //存信息到兑换按钮
        buttonExchange.fatherWindow = fawin;
        buttonExchange.updateButton(ex);
        //显示装备
        if (sample.exType == 8)
        {
            MagicWeapon nw = MagicWeaponManagerment.Instance.createMagicWeapon(sample.exchangeSid);
            magicW         = nw;
            nameLabel.text = QualityManagerment.getQualityColor(nw.getMagicWeaponQuality()) + nw.getName();
            if (button == null)
            {
                item      = NGUITools.AddChild(gameObject, goodsViewPrefab);
                item.name = "goodsView";
                button    = item.GetComponent <GoodsView>();
                button.onClickCallback = showMagicWeapon;
            }
            if (button != null && nw != null)
            {
                button.init(nw);
                button.fatherWindow         = fawin;
                button.rightBottomText.text = "";
            }
        }
        else
        {
            Equip equip = EquipManagerment.Instance.createEquip(sample.exchangeSid);
            //名称
            nameLabel.text = QualityManagerment.getQualityColor(equip.getQualityId()) + equip.getName();;
            if (button == null)
            {
                item      = NGUITools.AddChild(gameObject, goodsViewPrefab);
                item.name = "goodsView";
                button    = item.GetComponent <GoodsView>();
            }
            if (button != null && equip != null)
            {
                button.init(equip);
                button.fatherWindow         = fawin;
                button.rightBottomText.text = "";
            }
        }
    }
Esempio n. 6
0
    /// <summary>
    /// 添加广播公告
    /// </summary>
    public void addMessageRadio(string name, int vipLevel, string propType, int propSid)
    {
        string qualityName  = "";
        string qualityColor = "";
        string propName     = "";

        if (propType == TempPropType.EQUIPMENT)
        {
            EquipSample equipSample = EquipmentSampleManager.Instance.getEquipSampleBySid(propSid);
            qualityName  = QualityManagerment.getQualityNameByNone(equipSample.qualityId);
            qualityColor = QualityManagerment.getQualityColor(equipSample.qualityId);
            propName     = equipSample.name;
        }
        else if (propType == TempPropType.GOODS)
        {
            PropSample propSample = PropSampleManager.Instance.getPropSampleBySid(propSid);
            qualityName  = QualityManagerment.getQualityNameByNone(propSample.qualityId);
            qualityColor = QualityManagerment.getQualityColor(propSample.qualityId);
            propName     = propSample.name;
        }
        string str1;

        if (vipLevel > 0)
        {
            str1 = "[FF0000]" + LanguageConfigManager.Instance.getLanguage("s0509", name, vipLevel.ToString());
        }
        else
        {
            str1 = "[FF0000]" + name;
        }
        string str2    = qualityColor + qualityName + LanguageConfigManager.Instance.getLanguage("equipName") + propName;
        string message = "[FFFFFF]" + LanguageConfigManager.Instance.getLanguage("s0507", str1) + "[FFFFFF]" + LanguageConfigManager.Instance.getLanguage("s0561", str2);

        RadioManager.Instance.M_addRadioMsg(RadioManager.RADIO_LUCKY_EQUIP_TYPE, message);
    }
Esempio n. 7
0
 /// <summary>
 /// 减速
 /// </summary>
 private void speedDown()
 {
     timer.delayTime += 100;
     if (index == checkPoint)
     {
         StartCoroutine(playEffect(index));
         timer.stop();
         timer       = null;
         cycles      = 0;
         isSpeedDown = false;
         if (isStorageFulls(checkPoint))
         {
             isDrawing = false;
             return;
         }
         else
         {
             ShareDrawManagerment.Instance.canDrawTimes -= 1;
             string name = QualityManagerment.getQualityColor(prizeList[index].getPrize().getQuality()) + prizeList[index].getPrize().getPrizeName();
             init();//更新
             UiManager.Instance.createMessageLintWindowNotUnLuck(LanguageConfigManager.Instance.getLanguage("superDraw_18", name, prizeList[index].getPrize().getPrizeNumByInt().ToString()));
             isDrawing = false;
         }
         setDrawbuttonState();
     }
 }
    public void updatePropess(bool bo, Card card, int type, HeroGuideSample hero)
    {
        this.card = card;
        if (hero.prizeSample[0].type == 7)
        {
            name.text = QualityManagerment.getQualityColor(StringKit.toInt(hero.prizeSample[0].num) + 3) + LanguageConfigManager.Instance.getLanguage("teamEdit_err04l5", StringKit.toInt(hero.prizeSample[0].num) == 1?LanguageConfigManager.Instance.getLanguage("s0076"):LanguageConfigManager.Instance.getLanguage("s0077"));
            info.text = LanguageConfigManager.Instance.getLanguage("missionMain02l");
        }
        else
        {
            info.text = LanguageConfigManager.Instance.getLanguage("missionMain02");

            name.text = QualityManagerment.getQualityColor(card.getQualityId()) + card.getName() + "[-]" + "X" + hero.prizeSample[0].num.ToString();
        }
        if (type == 7)
        {
            ResourcesManager.Instance.LoadAssetBundleTexture(UserManager.Instance.self.getIconPath(), headIcon);
            headIcon.gameObject.transform.localScale = new Vector3(1.05f, 1.05f, 1f);
        }
        else if (type == 5)
        {
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + card.getIconID(), headIcon);
        }
        else
        {
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.NVSHENHEADPATH + card.getImageID() + "_head", headIcon);
        }
        totalNum = HeroGuideManager.Instance.getTotalNum(hero.missionSid) - 1;
        if (totalNum > 0)
        {
            newNum = (float)hero.stepNum / (float)totalNum;
        }
    }
Esempio n. 9
0
    public void init(Card card, CardSample sample, CardPictureWindow win)
    {
        this.sample = sample;
        showCard    = card;
        window      = win;
        if (CardImage != null)
        {
            if (showCard == null)
            {
                ResourcesManager.Instance.LoadAssetBundleTexture("texture/card/1", CardImage);
            }
            else
            {
                ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + sample.imageID, CardImage);
            }
        }
        cardName.text = QualityManagerment.getQualityColor(sample.qualityId) + sample.name;
        int jobId = sample.job;

        jobSign.spriteName = CardManagerment.Instance.qualityIconTextToBackGround(jobId) + "s";

        quality.spriteName = QualityManagerment.qualityIDToString(sample.qualityId) + "Bg";
        updateAttributes();

        cardLv.text = "Lv." + sample.maxLevel + "/" + sample.maxLevel;
        jinhua.text = sample.evoStarLevel + "/" + card.getMaxEvoLevel();

        updateSkill();
        loadTalent();
        //浏览到下一个卡牌的时需要重置容器的位置
        SpringPanel.Begin(panlObj.gameObject, new Vector3(0, 0, 0), 9);
    }
Esempio n. 10
0
    /// <summary>
    /// 加载显示
    /// </summary>
    public void loadShow()
    {
        if (card == null)
        {
            return;
        }
        ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + card.getImageID(), cardimage);
        cardName.text = card.getName();
        UpdateTopBackGround();
        initButton();
        UpdateQualityEffect();
        expBar.reset();
        expBar.updateValue(EXPSampleManager.Instance.getNowEXPShow(card.getEXPSid(), card.getEXP()), EXPSampleManager.Instance.getMaxEXPShow(card.getEXPSid(), card.getEXP()));
//        expLabel.text = EXPSampleManager.Instance.getNowEXPShow(card.getEXPSid(), card.getEXP()) + "/" + EXPSampleManager.Instance.getMaxEXPShow(card.getEXPSid(), card.getEXP());
        jobLabel.spriteName   = CardManagerment.Instance.qualityIconTextToBackGround(card.getJob()) + "s";
        qualityIco.spriteName = QualityManagerment.qualityIDToString(card.getQualityId()) + "Bg";
        qualityIco.alpha      = 1;
        updateAttributes();
        updateSkill();
        parent.setTitle(QualityManagerment.getQualityColor(card.getQualityId()) + card.getName());
        cardLevelLabel.text = "Lv." + card.getLevel() + "/" + card.getMaxLevel();
        evoLabel.spriteName = card.isMainCard() ? "attr_evup" : "attr_ev";
        if (EvolutionManagerment.Instance.getMaxLevel(card) == 0)
        {
            evoTimes.text = LanguageConfigManager.Instance.getLanguage("Evo10");
        }
        else
        {
            evoTimes.text = card.isMainCard() ? card.getSurLevel() + "/" + SurmountManagerment.Instance.getMaxSurLevel(card) : card.getEvoLevel() + "/" + card.getMaxEvoLevel();
        }
    }
Esempio n. 11
0
    private void updateEquipItem()
    {
        Equip tempEquip = StorageManagerment.Instance.getEquipTypeBySid(noticeContent.getSourceEquipSid());

        if (checkEquipIndex() != 0)
        {
            isHaveEquip = true;
        }

        if (IN_STORE == checkEquipIndex())
        {
            oldEquip = StorageManagerment.Instance.getEquipTypeBySid(noticeContent.getSourceEquipSid());
        }
        else
        {
            oldEquip = EquipManagerment.Instance.createEquip(noticeContent.getSourceEquipSid());
        }
        if (newEquip == null)
        {
            newEquip = EquipManagerment.Instance.createEquip("", noticeContent.getTargetEquipSid(), oldEquip.getEXP(), 0, oldEquip.getrefineEXP());
        }
        if (isHaveEquip)
        {
            noEquipGroup.SetActive(false);
            equipGroup.SetActive(true);
            if (oldEquip != null)
            {
                oldNameLabel.text           = QualityManagerment.getQualityColor(oldEquip.getQualityId()) + "Lv." + oldEquip.getLevel() + oldEquip.getName();
                oldQualitySprite.spriteName = QualityManagerment.qualityIDToIconSpriteName(oldEquip.getQualityId());
                ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + oldEquip.getIconId(), oldIconSprite);
                AttrChange[] attrs = oldEquip.getAttrChanges();
                if (attrs != null)
                {
                    if (attrs.Length > 0 && attrs [0] != null)
                    {
                        oldAttrLabel.text = attrs [0].typeToString() + attrs [0].num;
                    }
                }
            }
            if (newEquip != null)
            {
                newNameLabel.text          = QualityManagerment.getQualityColor(newEquip.getQualityId()) + "Lv." + newEquip.getLevel() + newEquip.getName();
                newQulitySprite.spriteName = QualityManagerment.qualityIDToIconSpriteName(newEquip.getQualityId());
                ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + newEquip.getIconId(), newIconSprite);
                AttrChange[] attrs = newEquip.getAttrChanges();
                if (attrs != null)
                {
                    if (attrs.Length > 0 && attrs [0] != null)
                    {
                        newAttrLabel.text = attrs [0].typeToString() + attrs [0].num;
                    }
                }
            }
        }
        else
        {
            noEquipGroup.SetActive(true);
            equipGroup.SetActive(false);
        }
    }
Esempio n. 12
0
    public void initUI(Chat _chat)
    {
        chat = _chat;
        uid  = chat.uid;
        DateTime dt       = TimeKit.getDateTime(chat.stime);
        string   hourInfo = dt.Hour < 10?"0" + dt.Hour:dt.Hour.ToString();
        string   minInfo  = dt.Minute < 10?"0" + dt.Minute:dt.Minute.ToString();

        time    = "[" + hourInfo + ":" + minInfo + "]";
        type    = getChatType(chat.channelType);
        sname   = "[" + chat.name + "]";
        job     = chat.channelType != 2 ? "" : "[" + getJob(chat.job) + "]";
        content = chat.content;
        if (EXPSampleManager.Instance.getLevel(3, chat.vip) != 0)
        {
            vip = "[Vip" + EXPSampleManager.Instance.getLevel(3, chat.vip) + "]";
        }
        else
        {
            vip = "";
        }

        showSender.fatherWindow = this.fatherWindow;
        showItem.fatherWindow   = this.fatherWindow;
        showSender.showType     = 0;
        showSender.uid          = chat.uid;

        if (ChatManagerment.Instance.getMsgType(chat) == ChatManagerment.MSGTYPE_SAY)
        {
            showItem.showType = 999;
            if (!ChatManagerment.Instance.isSystemMsg(chat))
            {
                showLabel.text = type + sname + job + vip + ":" + content + time;
            }
            else
            {
                showSender.gameObject.SetActive(false);
                showItem.gameObject.SetActive(false);
                showLabel.text = type + content + time;
            }
        }
        else
        {
            if (ChatManagerment.Instance.getMsgType(chat) == ChatManagerment.MSGTYPE_EQUIP)
            {
                showItem.showType = 1;
                showItem.equip    = EquipManagerment.Instance.createEquip(chat.goods);
                showLabel.text    = type + sname + job + vip + ":" + LanguageConfigManager.Instance.getLanguage("s0305")
                                    + QualityManagerment.getQualityColor(showItem.equip.getQualityId()) + "[" + showItem.equip.getName() + "]" + "[-]" + time;
            }
            else if (ChatManagerment.Instance.getMsgType(chat) == ChatManagerment.MSGTYPE_CARD)
            {
                showItem.showType = 2;
                showItem.card     = CardManagerment.Instance.createCardByChatServer(chat.goods);
                showLabel.text    = type + sname + job + vip + ":" + LanguageConfigManager.Instance.getLanguage("s0304")
                                    + QualityManagerment.getQualityColor(showItem.card.card.getQualityId()) + "[" + showItem.card.card.getName() + "]" + "[-]" + time;
            }
        }
        dynamicHeight();
    }
Esempio n. 13
0
 /// <summary>
 /// 更新拥有形象(强化等级,进阶等级,形象,形象背景)
 /// </summary>
 private void updateCommonInfo()
 {
     if (magicWeapon.getPhaseLv() > 0)
     {
         phaseLv.gameObject.SetActive(true);
         phaseLv.text = "+" + magicWeapon.getPhaseLv().ToString();
     }
     else
     {
         phaseLv.gameObject.SetActive(false);
     }
     magicName.text = QualityManagerment.getQualityColor(magicWeapon.getMagicWeaponQuality()) + magicWeapon.getName();
     ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + magicWeapon.getIconId(), icon);
     strengLv.text      = "Lv." + magicWeapon.getStrengLv().ToString() + "/" + magicWeapon.getMaxStrengLv().ToString();
     icon_bg.spriteName = QualityManagerment.qualityIDtoMagicWeapon(magicWeapon.getMagicWeaponQuality());
     if (starPrefab != null)
     {
         Utils.RemoveAllChild(icon.transform);
         int starLevel = MagicWeaponSampleManager.Instance.getMagicWeaponSampleBySid(magicWeapon.sid).starLevel;
         if (starLevel > 0)
         {
             ShowStars show = NGUITools.AddChild(icon.gameObject, starPrefab).GetComponent <ShowStars>();
             show.initStar(starLevel, MagicWeaponManagerment.USEDBUMAGIC_ATTRSHOW);
         }
     }
     jobType.gameObject.SetActive(true);
     jobBg.gameObject.SetActive(true);
     if (magicWeapon.getMgType() == JobType.POWER)  //力
     {
         jobType.spriteName = "roleType_2s";
     }
     else if (magicWeapon.getMgType() == JobType.MAGIC)    //魔
     {
         jobType.spriteName = "roleType_5s";
     }
     else if (magicWeapon.getMgType() == JobType.AGILE)    //敏
     {
         jobType.spriteName = "roleType_3s";
     }
     else if (magicWeapon.getMgType() == JobType.POISON)    //毒
     {
         jobType.spriteName = "roleType_4s";
     }
     else if (magicWeapon.getMgType() == JobType.COUNTER_ATTACK)    //反
     {
         jobType.spriteName = "roleType_1s";
     }
     else if (magicWeapon.getMgType() == JobType.ASSIST)    //辅
     {
         jobType.spriteName = "roleType_6s";
     }
     else
     {
         jobType.gameObject.SetActive(false);
         jobBg.gameObject.SetActive(false);
     }
     updateAttrChanges();
     updateSkills();
 }
Esempio n. 14
0
    //设置创建按钮信息
    private void setCreatButton(PrizeSample _prize)
    {
        if (_prize == null)
        {
            return;
        }
        else
        {
            prize = _prize;
            roleButton.gameObject.SetActive(false);
            goodsButton.gameObject.SetActive(false);
            goodsButton.fatherWindow = fatherWindow;

            switch (prize.type)
            {
            case PrizeType.PRIZE_BEAST:
                roleButton.gameObject.SetActive(true);
                Card beast = CardManagerment.Instance.createCard(prize.pSid);
                roleButton.init(beast, fatherWindow, roleButton.DefaultClickEvent);
                break;

            case PrizeType.PRIZE_CARD:
                goodsButton.gameObject.SetActive(true);
                Card card = CardManagerment.Instance.createCard(prize.pSid);
                goodsButton.onClickCallback = () => { CardBookWindow.Show(card, CardBookWindow.SHOW, null); fatherWindow.finishWindow(); };
                goodsButton.init(card);
                break;

            case PrizeType.PRIZE_EQUIPMENT:
                goodsButton.gameObject.SetActive(true);
                Equip equip = EquipManagerment.Instance.createEquip(prize.pSid);
                goodsButton.init(equip, prize.getPrizeNumByInt());
                break;

            case PrizeType.PRIZE_MONEY:
                goodsButton.gameObject.SetActive(true);
                goodsButton.init(prize);
                break;

            case PrizeType.PRIZE_PROP:
                goodsButton.gameObject.SetActive(true);
                Prop prop = PropManagerment.Instance.createProp(prize.pSid);
                goodsButton.init(prop, prize.getPrizeNumByInt());
                break;

            case PrizeType.PRIZE_RMB:
                goodsButton.gameObject.SetActive(true);
                goodsButton.init(prize);
                break;
            }

            if (prizeName != null)
            {
                prizeName.text = QualityManagerment.getQualityColor(prize.getQuality()) + prize.getPrizeName();
            }
        }
    }
Esempio n. 15
0
    ///<summary>
    /// 更新属性描述
    /// </summary>
    public void onCenterItem(GameObject obj)
    {
        int        index = StringKit.toInt(obj.name) - 1;
        SuitSample tmp;

        if (index != 0)
        {
            tmp = SuitSampleManager.Instance.getSuitSampleBySid(chooseEquip.getSuitSid() * 100 + index);
        }
        else
        {
            tmp = SuitSampleManager.Instance.getSuitSampleBySid(chooseEquip.getSuitSid());
        }
        if (isEquipStarSuitTrue(index))
        {
            suitTitle.text = QualityManagerment.getQualityColor(chooseEquip.getQualityId()) + tmp.name + "[FFFFFF]" + LanguageConfigManager.Instance.getLanguage("s0010") + ("[3A9663]" + LanguageConfigManager.Instance.getLanguage("equipStar08") + "[-]");
            desInfo.text   = LanguageConfigManager.Instance.getLanguage("equipStar15", index.ToString(), index.ToString());
        }
        else if (index > 0)
        {
            suitTitle.text = QualityManagerment.getQualityColor(chooseEquip.getQualityId()) + tmp.name + "[FFFFFF]" + LanguageConfigManager.Instance.getLanguage("s0010") + ("[FF0000]" + LanguageConfigManager.Instance.getLanguage("equipStar12") + "[-]");
            desInfo.text   = LanguageConfigManager.Instance.getLanguage("equipStar15", index.ToString(), index.ToString());
        }
        else
        {
            desInfo.text   = LanguageConfigManager.Instance.getLanguage("equipStar14");
            suitTitle.text = QualityManagerment.getQualityColor(chooseEquip.getQualityId()) + tmp.name + "[FFFFFF]" + LanguageConfigManager.Instance.getLanguage("s0010");
        }
        findAllEffect(tmp, index, index);
        if (chooseEquip.getQualityId() >= 5)
        {
            if (index == length)
            {
                rightArrow.SetActive(false);
            }
            else
            {
                rightArrow.SetActive(true);
            }
            if (index == 0)
            {
                leftArrow.SetActive(false);
            }
            else
            {
                leftArrow.SetActive(true);
            }
        }
        else
        {
            leftArrow.SetActive(false);
            rightArrow.SetActive(false);
        }
    }
Esempio n. 16
0
 /// <summary>
 /// 初始化UI
 /// </summary>
 public void initItemUI(FestivalFireworksSample fireworksSample, WindowBase win)
 {
     this.win                 = win;
     this.fireworksSample     = fireworksSample;
     this.itemSid             = fireworksSample.noitceItemSid;
     this.fireworksSid        = fireworksSample.prizes.pSid;
     this.fireworksLabel.text = QualityManagerment.getQualityColor(fireworksSample.prizes.getQuality()) + fireworksSample.prizes.getPrizeName();
     fireworks.init(fireworksSample.prizes);
     fireworks.rightBottomText.text = "x" + getPropsNum(fireworksSid);
     fireworks.fatherWindow         = win;
     initButton();
 }
Esempio n. 17
0
    /// <summary>
    /// 更新页面上UI
    /// </summary>
    public void updateUI()
    {
        ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + selectProp.getIconId(), icon);
        name.text = QualityManagerment.getQualityColor(selectProp.getQualityId()) + selectProp.getName();;
        string[] desc = selectProp.getDescribe().Split('\n');
        dec.text  = desc[0];
        dec2.text = desc[1];
        openNum   = selectProp.getNum() <= 10?selectProp.getNum():10;

        if (openNum == 0)
        {
            rightButton.disableButton(true);
            leftButton.disableButton(true);
        }
        else
        {
            rightButton.disableButton(false);
            leftButton.disableButton(false);
        }
        content.reload(selectProp.getPrizeSampleLcok(), this);
        PrizeSample[] needProp = selectProp.getNeedPropLcok();
        if (needProp != null && needProp.Length >= 1)
        {
            GoodsSample p           = GoodsSampleManager.Instance.getGoodsSampleBySid(needProp[0].pSid);
            Prop        prop        = PropManagerment.Instance.createProp(p.goodsSID);
            Prop        storageProp = StorageManagerment.Instance.getProp(prop.sid);
            if (storageProp != null)
            {
                prop.setNum(storageProp.getNum());
            }
            else
            {
                prop.setNum(0);
            }

            needP.init(prop);
            needP.setCountActive(true);
            lockSid      = p.goodsSID;
            needNum      = needProp[0].getPrizeNumByInt();
            luckGoodsSid = needProp[0].pSid;
            needDec.text = QualityManagerment.getQualityColor(prop.getQualityId()) + prop.getName() + "X" + needNum.ToString();
        }
        int num = 10;

        if (selectProp.getNum() < num)
        {
            num = selectProp.getNum();
        }
        rightButton.textLabel.text = LanguageConfigManager.Instance.getLanguage("s03l2", num.ToString());
    }
Esempio n. 18
0
    public void UpdateLabelText()
    {
        integralValue.text = integral.ToString();
        if (integral == 0 || rank <= 0 || rank == 0)
        {
            rankValue.text = LanguageConfigManager.Instance.getLanguage("s0560");
        }
        else
        {
            rankValue.text = rank.ToString();
        }
        string desc = QualityManagerment.getQualityNameByNone(card.getQualityId()) + card.getName();

        descTextLabel.text = LanguageConfigManager.Instance.getLanguage("LuckyCardContent_desc", desc);
        cardName.text      = QualityManagerment.getQualityColor(card.getQualityId()) + card.getName();
        updateDrawInfoDesc();
    }
Esempio n. 19
0
    void updateAttrs()
    {
        for (int i = 0; i < attrLabel.Length; i++)  //清空属性信息
        {
            attrLabel[i].text       = "";
            evoAddAttrLabel[i].text = "";
        }
        describe.text = "";
        CardBaseAttribute cardAttr = CardManagerment.Instance.getCardAllWholeAttr(choosedCard);

        this.heroName.text = QualityManagerment.getQualityColor(choosedCard.getQualityId()) + choosedCard.getName();
        //卡片现在的属性
        attrLabel[0].text = cardAttr.getWholeHp() + "";
        attrLabel[1].text = cardAttr.getWholeAtt() + "";
        attrLabel[2].text = cardAttr.getWholeDEF() + "";
        attrLabel[3].text = cardAttr.getWholeMAG() + "";
        attrLabel[4].text = cardAttr.getWholeAGI() + "";
    }
    public void updatePropess(bool bo, Card card, int type)
    {
        HeroGuideSample heroGuideSample = HeroGuideManager.Instance.getCurrectSample(MissionInfoManager.Instance.mission.getPlayerPointIndex());

        this.card = card;
        if (type == 7)
        {
            info.text = LanguageConfigManager.Instance.getLanguage("missionMain02l");
            name.text = QualityManagerment.getQualityColor(StringKit.toInt(heroGuideSample.prizeSample[0].num) + 3) + LanguageConfigManager.Instance.getLanguage("teamEdit_err04l5", StringKit.toInt(heroGuideSample.prizeSample[0].num) == 1?LanguageConfigManager.Instance.getLanguage("s0076"):LanguageConfigManager.Instance.getLanguage("s0077"));
        }
        else
        {
            info.text = LanguageConfigManager.Instance.getLanguage("missionMain02");

            name.text = QualityManagerment.getQualityColor(card.getQualityId()) + card.getName() + "[-]" + "X" + HeroGuideManager.Instance.getCurrectSample(MissionInfoManager.Instance.mission.getPlayerPointIndex()).prizeSample[0].num.ToString();
        }
        if (type == 7)
        {
            ResourcesManager.Instance.LoadAssetBundleTexture(UserManager.Instance.self.getIconPath(), headIcon);
            headIcon.gameObject.transform.localScale = new Vector3(1.05f, 1.05f, 1f);
        }
        else if (type == 5)
        {
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + card.getIconID(), headIcon);
        }
        else
        {
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.NVSHENHEADPATH + card.getImageID() + "_head", headIcon);
        }
        totalNum = HeroGuideManager.Instance.getTotalNum(MissionInfoManager.Instance.mission.sid) - 1;
        if (totalNum > 0)
        {
            if (!bo)
            {
                int index = (heroGuideSample.stepNum - 1) >= 0?(heroGuideSample.stepNum - 1):0;
                newNum = (float)(index) / (float)totalNum;
            }
            else
            {
                EffectManager.Instance.CreateEffect(headIcon.transform, "Effect/UiEffect/feature_open");
                newNum = (float)heroGuideSample.stepNum / (float)totalNum;
            }
        }
    }
Esempio n. 21
0
    /** 初始化卡片 */
    public void initCardButton(GameObject gameObj, Card card, int index)
    {
        GameObject obj  = NGUITools.AddChild(gameObj, roleViewPrefab);
        RoleView   view = obj.GetComponent <RoleView> ();

        if (cardName != null)
        {
            string color = QualityManagerment.getQualityColor(card.getQualityId());
            if (card.getQualityId() == QualityType.COMMON)
            {
                cardName.text = card.getName();
            }
            else
            {
                cardName.text = color + card.getName();
            }

            GameObject card_name = NGUITools.AddChild(obj, cardName.gameObject);
            card_name.transform.localScale    = new Vector3(1.3f, 1.3f, 1);
            card_name.transform.localPosition = new Vector3(0, -131, 0);
            card_name.SetActive(true);
        }
        if (cardList.Count == 1)
        {
            view.linkEffectPoint();
        }
        else
        {
            if (card.getQualityId() >= QualityType.EPIC)
            {
                NGUITools.AddChild(gameObj, qualityEffectPrefab);
            }
        }
        view.showType     = CardBookWindow.SHOW;
        view.hideInBattle = false;
        view.init(card, this, (roleView) => {
            TweenAlpha lname = TweenAlpha.Begin(gameObject, 1f, 0);
            lname.from       = 1;
            CardBookWindow.Show(cardList, index, view.showType, (() => {
                lname = TweenAlpha.Begin(gameObject, 1.5f, 1);
                lname.from = 0;
            }));
        });
    }
Esempio n. 22
0
    /// <summary>
    /// 添加广播公告
    /// </summary>
    public void addMessageRadio(string name, int vipLevel, int soulSid)
    {
        StarSoulSample soulSample   = StarSoulSampleManager.Instance.getStarSoulSampleBySid(soulSid);
        string         qualityName  = QualityManagerment.getQualityNameByNone(soulSample.qualityId);
        string         qualityColor = QualityManagerment.getQualityColor(soulSample.qualityId);
        string         str1;

        if (vipLevel > 0)
        {
            str1 = "[F85C5C]" + LanguageConfigManager.Instance.getLanguage("s0509", name, vipLevel.ToString());
        }
        else
        {
            str1 = "[F85C5C]" + name;
        }
        string str2    = qualityColor + qualityName + LanguageConfigManager.Instance.getLanguage("Guide_28") + soulSample.name;
        string message = "[FFFFFF]" + LanguageConfigManager.Instance.getLanguage("s0507", str1) + "[FFFFFF]" + LanguageConfigManager.Instance.getLanguage("s0561", str2);

        RadioManager.Instance.M_addRadioMsg(clearType, message);
    }
    private void updatePropess()
    {
        HeroGuideSample heroGuideSample = HeroGuideManager.Instance.getCurrectSample(MissionInfoManager.Instance.mission.getPlayerPointIndex());

        if (heroGuideSample.prizeSample[0].type == 7)
        {
            name.text = QualityManagerment.getQualityColor(StringKit.toInt(heroGuideSample.prizeSample[0].num) + 3) + LanguageConfigManager.Instance.getLanguage("teamEdit_err04l5", StringKit.toInt(heroGuideSample.prizeSample[0].num) == 1?LanguageConfigManager.Instance.getLanguage("s0076"):LanguageConfigManager.Instance.getLanguage("s0077"));
            info.text = LanguageConfigManager.Instance.getLanguage("missionMain02l");
        }
        else
        {
            info.text = LanguageConfigManager.Instance.getLanguage("missionMain02");
            name.text = QualityManagerment.getQualityColor(card.getQualityId()) + card.getName() + "[-]" + "X" + HeroGuideManager.Instance.getCurrectSample(MissionInfoManager.Instance.mission.getPlayerPointIndex()).prizeSample[0].num.ToString();
        }
        totalNum = HeroGuideManager.Instance.getTotalNum(MissionInfoManager.Instance.mission.sid) - 1;
        if (totalNum > 0)
        {
            newNum = (float)heroGuideSample.stepNum / (float)totalNum;;
        }
    }
Esempio n. 24
0
    /// <summary>
    /// 添加广播公告
    /// </summary>
    public void addMessageRadio(string name, int vipLevel, string cardType, int cardSid)
    {
        CardSample cardSample   = CardSampleManager.Instance.getRoleSampleBySid(cardSid);
        string     qualityName  = QualityManagerment.getQualityNameByNone(cardSample.qualityId);
        string     qualityColor = QualityManagerment.getQualityColor(cardSample.qualityId);
        string     str1;

        if (vipLevel > 0)
        {
            str1 = "[F85C5C]" + LanguageConfigManager.Instance.getLanguage("s0509", name, vipLevel.ToString());
        }
        else
        {
            str1 = "[F85C5C]" + name;
        }
        string str2    = qualityColor + qualityName + LanguageConfigManager.Instance.getLanguage("cardName") + cardSample.name;
        string message = "[FFFFFF]" + LanguageConfigManager.Instance.getLanguage("s0507", str1) + "[FFFFFF]" + LanguageConfigManager.Instance.getLanguage("s0561", str2);

        RadioManager.Instance.M_addRadioMsg(RadioManager.RADIO_LUCKY_CARD_TYPE, message);
    }
    /// <summary>
    /// 减速
    /// </summary>
    private void speedDown()
    {
        timer.delayTime += 100;
        if (index == checkPoint)
        {
            StartCoroutine(playEffect(index));
            timer.stop();
            timer = null;

            cycles      = 0;
            isSpeedDown = false;

            //getAwardEffect (0, prizeList [index].getPrize ());
            string name = QualityManagerment.getQualityColor(prizeList [index].getPrize().getQuality()) + prizeList [index].getPrize().getPrizeName();
            int    sid  = CommonConfigSampleManager.Instance.getSampleBySid <SuperDrawMaxSample>(CommonConfigSampleManager.SuperDraw_SID).prizeSid;
            init();
            UiManager.Instance.createMessageLintWindowNotUnLuck(LanguageConfigManager.Instance.getLanguage("superDraw_18", name, prizeList[index].getPrize().pSid == sid ? (prizeList[index].getPrize().getPrizeNumByInt() + "%"):prizeList[index].getPrize().getPrizeNumByInt().ToString()));
            isDrawing = false;
            setDrawbuttonState();
        }
    }
Esempio n. 26
0
    /**更新秘宝的基本信息 */
    private void UpdateMagicWeapon()
    {
        showName = QualityManagerment.getQualityColor(magicWeapon.getMagicWeaponQuality()) + magicWeapon.getName();
        ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + magicWeapon.getIconId(), icon);
        backGround.spriteName = QualityManagerment.qualityIDtoMagicWeapon(magicWeapon.getMagicWeaponQuality());
        icon.SetRect(0f, 0f, 105, 105f);
        icon.transform.localPosition = new Vector3(0f, 6f, 1f);
        setCountActive(count > 0);
        if (count / 1000000 > 0)
        {
            rightBottomText.text = "x" + count / 10000 + "W";
        }
        else
        {
            rightBottomText.text = "x" + count;
        }
        rightBottomText.text = "";
        int level = MagicWeaponSampleManager.Instance.getMagicWeaponSampleBySid(magicWeapon.sid).starLevel;

        showStar(level, CardSampleManager.USEDBYCARD);
    }
Esempio n. 27
0
 public void Initialize(Prop chooseItem, Goods good, CallBack callback)
 {
     this.callback = callback;
     this.goods    = good;
     chooseProp    = chooseItem;
     if (chooseProp != null)
     {
         ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + chooseProp.getIconId(), propImage);
         propName.text = QualityManagerment.getQualityColor(chooseProp.getQualityId()) + chooseProp.getName() + "";
         Prop pp = StorageManagerment.Instance.getProp(chooseItem.sid);
         if (chooseItem.isCardScrap() && stars != null)
         {
             Card card = CardScrapManagerment.Instance.getCardByScrapSid(chooseItem.sid);//根据卡片碎片id获取对应卡片
             showStar(card);
         }
         if (pp == null)
         {
             propHaveNumber.text = LanguageConfigManager.Instance.getLanguage("intensifyEquip04") + "0";
         }
         else
         {
             propHaveNumber.text = LanguageConfigManager.Instance.getLanguage("intensifyEquip04") + pp.getNum().ToString();
         }
         propDescript.text  = chooseProp.getDescribe();
         quality.spriteName = QualityManagerment.qualityIDToIconSpriteName(chooseProp.getQualityId());
         if (scrapIcon != null)
         {
             if (chooseProp.isScrap())
             {
                 scrapIcon.gameObject.SetActive(true);
             }
             else
             {
                 scrapIcon.gameObject.SetActive(false);
             }
         }
         updateConstIcon();
         updateByButtonState();
     }
 }
Esempio n. 28
0
 /** 更新星云特效UI显示 */
 public void updateNebulaEffectUI()
 {
     if (currentTapIndex == StarSoulConfigManager.HUNT_MONEY_TYPE)
     {
         updateNebulaActiveStateforRMB(false);
         updateNebulaActiveState(true);
         //nebulaText.text = QualityManagerment.getQualityColor(currentNebulaIndex+1)+"【"+LanguageConfigManager.Instance.getLanguage ("StarSoulWindow_Nebula"+currentNebulaIndex)+"】";
         nebulaText.text = "【" + LanguageConfigManager.Instance.getLanguage("StarSoulWindow_Nebula" + currentNebulaIndex) + "】";
         StartCoroutine(moveNebulaScrollView());
     }
     else if (currentTapIndex == StarSoulConfigManager.HUNT_RMB_TYPE)
     {
         updateNebulaActiveState(false);
         updateNebulaActiveStateforRMB(true);
         nebulaText.text = QualityManagerment.getQualityColor(5) + "【" + LanguageConfigManager.Instance.getLanguage("StarSoulWindow_Nebula5") + "】";
         GameObject obj;
         if (nebulaEffectPointsforRmb.transform.childCount == 0)
         {
             NGUITools.AddChild(nebulaEffectPointsforRmb, rmbEffectperfab);
         }
     }
 }
Esempio n. 29
0
    //改变图片
    public void changeImage(int id, int index)
    {
        if (type == "card")
        {
            CardSample s = CardSampleManager.Instance.getRoleSampleBySid(id);
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + s.imageID, icons[index]);
            qualitys[index].spriteName = QualityManagerment.qualityIDToStringByBG(s.qualityId);


            //设置卡片底部的卡片名
            string colorName = QualityManagerment.getQualityColor(s.qualityId);
            // cardName[index].text = colorName + s.name + "[-]";
            cardName[index].text = s.name;
            nameBgLeft[index].transform.localPosition  = new Vector3((float)(-50 - cardName[index].width / 2), nameBgLeft[index].transform.localPosition.y, nameBgLeft[index].transform.localPosition.z);
            nameBgRight[index].transform.localPosition = new Vector3((float)(50 + cardName[index].width / 2), nameBgRight[index].transform.localPosition.y, nameBgRight[index].transform.localPosition.z);

            //	ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.BACKGROUNDPATH + "backGround_9",buttom[index]);
        }
        else if (type == "equip")
        {
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + EquipmentSampleManager.Instance.getEquipSampleBySid(id).iconId, icons[index]);
        }
        else if (type == "prop")
        {
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + PropSampleManager.Instance.getPropSampleBySid(id).iconId, icons[index]);
        }
        else if (type == "beast")
        {
            if (CommandConfigManager.Instance.getNvShenClothType() == 0)
            {
                ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + CardSampleManager.Instance.getRoleSampleBySid(id).imageID + "c", icons[index]);
            }
            else
            {
                ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + CardSampleManager.Instance.getRoleSampleBySid(id).imageID, icons[index]);
            }
        }
    }
 //最原始的初始化
 public void init(object obj, int numberMax, int numberMin, int numberNow, int numberSetp, int costType, CallBackMsg callback)
 {
     msg           = new MessageHandle();
     msg.msgInfo   = obj;
     item          = obj;
     this.callback = callback;
     setp          = numberSetp;
     max           = numberMax;
     min           = numberMin;
     now           = numberNow;
     coverDistanceToOne();
     this.costType = costType;
     updateCoinIcon();
     updateDisplayeNumber();
     calculateTotal();
     if (obj.GetType() == typeof(Goods))
     {
         Goods good = item as Goods;
         Prop  p    = PropManagerment.Instance.createProp(good.getGoodsSid());
         if (p != null)
         {
             nameBg.text   = QualityManagerment.getQualityColor(p.getQualityId()) + p.getName() + "[-]";
             nameDecc.text = LanguageConfigManager.Instance.getLanguage("s03l6", now.ToString(), p.getName());
         }
         titleText.text = (obj as Goods).getName();
         ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + good.getIconId(), goodsTexture);
         goodsTexture.gameObject.SetActive(true);
         goodsBg.gameObject.SetActive(true);
         if (good.getGoodsType() == PrizeType.PRIZE_EQUIPMENT)
         {
             goodsBg.spriteName = QualityManagerment.qualityIDToIconSpriteName(EquipmentSampleManager.Instance.getEquipSampleBySid(good.getGoodsSid()).qualityId);
         }
         else if (good.getGoodsType() == PrizeType.PRIZE_PROP)
         {
             goodsBg.spriteName = QualityManagerment.qualityIDToIconSpriteName(PropSampleManager.Instance.getPropSampleBySid(good.getGoodsSid()).qualityId);
         }
     }
 }