Ejemplo n.º 1
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);
    }
Ejemplo n.º 2
0
 public void updateButton(Card newCard)
 {
     if (newCard == null)
     {
         cleanButton();
         return;
     }
     else
     {
         card = newCard;
         ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + card.getImageID(), cardImage);
         quality.spriteName = QualityManagerment.qualityIDToString(card.getQualityId());
         level.text         = card.getLevel().ToString();
         sign.spriteName    = CardManagerment.Instance.jobIDToString(card.getJob());
         resetCard();
         if (!win.isSelect(card))
         {
             isChoose = false;
             selectPic.gameObject.SetActive(false);
         }
         else
         {
             isChoose = true;
             selectPic.gameObject.SetActive(true);
         }
     }
 }
Ejemplo n.º 3
0
 public void updateInfo()
 {
     if (card != null)
     {
         inbattle.gameObject.SetActive(!hideInBattle && (ArmyManager.Instance.getAllArmyPlayersIds().Contains(card.uid) || ArmyManager.Instance.getAllArmyAlternateIds().Contains(card.uid)));
         ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + card.getImageID(), icon);
         quality.spriteName = QualityManagerment.qualityIDToString(card.getQualityId());
         quality.gameObject.SetActive(true);
         qualityBg.spriteName = QualityManagerment.qualityIDToBackGround(card.getQualityId());
         qualityBg.gameObject.SetActive(true);
         if (jobBg != null)
         {
             jobBg.gameObject.SetActive(true);
         }
         if (hpBg != null)
         {
             hpBg.gameObject.SetActive(true);
         }
         job.text = CardManagerment.Instance.jobIDToString(card.getJob());
         job.gameObject.SetActive(true);
         level.text = "Lv." + card.getLevel();
         level.gameObject.SetActive(true);
     }
     else if (sample != null)
     {
         inbattle.gameObject.SetActive(false);
         ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + sample.imageID, icon);
         quality.spriteName   = QualityManagerment.qualityIDToString(sample.qualityId);
         qualityBg.spriteName = QualityManagerment.qualityIDToBackGround(sample.qualityId);
         job.text             = CardManagerment.Instance.jobIDToString(sample.job);
         level.text           = "Lv.1";
     }
 }
Ejemplo n.º 4
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();
        }
    }
Ejemplo n.º 5
0
    public IEnumerator playBloodEffect(EvoEffectCtrl ctrl, Card main, CallBack callback, string imagePath1, string imagePath2)
    {
        Card newCard = StorageManagerment.Instance.getRole(main.uid);

        ResourcesManager.Instance.LoadAssetBundleTexture(imagePath1 + main.getImageID(), ctrl.main, (obj) => {
            ctrl.main.alpha = 0;
        });
        ResourcesManager.Instance.LoadAssetBundleTexture(imagePath2 + main.getImageID(), ctrl.after, (obj) => {
            ctrl.sub.alpha = 0;
        });
        //ResourcesManager.Instance.LoadAssetBundleTexture(imagePath1 + BloodConfigManager.Instance.getCurrentBloodImage(newCard.sid,newCard.cardBloodLevel), ctrl.sub, (obj) => {
        //    ctrl.after.alpha = 0;
        //});
        ResourcesManager.Instance.LoadAssetBundleTexture(imagePath2 + main.getImageID(), ctrl.sub, (obj) => {
            ctrl.after.alpha = 0;
        });
        yield return(new WaitForSeconds(1.5f));

        if (main.isInSuperEvo())
        {
            EffectManager.Instance.CreateEffectCtrlByCache(effectPoint, "Effect/UiEffect/EvolutionarySuccess_super", null);
        }
        else
        {
            EffectManager.Instance.CreateEffectCtrlByCache(effectPoint, "Effect/UiEffect/EvolutionarySuccess", null);
        }
        yield return(new WaitForSeconds(1.5f));

        qualitySprite.spriteName = QualityManagerment.qualityIDToString(newCard.getQualityId()) + "Bg";
        qualitySprite.gameObject.SetActive(true);

        TweenScale ts = TweenScale.Begin(qualitySprite.gameObject, 0.2f, Vector3.one);

        ts.method = UITweener.Method.EaseIn;
        ts.from   = new Vector3(5, 5, 1);
        EventDelegate.Add(ts.onFinished, () => {
            iTween.ShakePosition(qualitySprite.gameObject, iTween.Hash("amount", new Vector3(0.03f, 0.03f, 0.03f), "time", 0.4f));
            iTween.ShakePosition(qualitySprite.gameObject, iTween.Hash("amount", new Vector3(0.01f, 0.01f, 0.01f), "time", 0.4f));
        }, true);
        bg.gameObject.SetActive(true);
        iTween.MoveTo(ctrl.gameObject, iTween.Hash("position", new Vector3(0.0f, 150.0f, 0.0f), "time", 0.5f, "easetype", "linear", "islocal", true));
        yield return(new WaitForSeconds(1f));

        if (newCard.getEvoLevel() > main.getEvoLevel())
        {
            UiManager.Instance.openDialogWindow <CardAttrLevelInfo>((win) => {
                win.Initialize(main, newCard, callback);
            });
        }
        else
        {
            yield return(new WaitForSeconds(1.5f));

            hideEvoComponent();
            finishWindow();
            callback();
        }
    }
Ejemplo n.º 6
0
    /// <summary>
    /// 品质突破的表现
    /// </summary>
    /// <param name="msg"></param>
    private void showQualityEvo()
    {
        ResourcesManager.Instance.LoadAssetBundleTexture("texture/backGround/ChouJiang_BeiJing", tupaoBackGroundTexture);
        tupaoBackGroundTexture.gameObject.SetActive(true);
        showObjEff.SetActive(true);
        combatPoint.SetActive(true);
        ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + choosedCard.getImageID(), effectCard.icon);
        newQuality.spriteName = QualityManagerment.qualityIDToString(choosedCard.getQualityId()) + "Bg";
        TweenPosition tp = TweenPosition.Begin(effectCard.gameObject, 0.3f, effectCard.transform.localPosition);

        tp.from = new Vector3(500, effectCard.transform.localPosition.y, 0);
        EventDelegate.Add(tp.onFinished, () => {
            StartCoroutine(Utils.DelayRun(() => {
                //nextSetp++;//开始第二步
                NGUITools.AddChild(effectCard.gameObject, getEffectByQualiy().gameObject);
                StartCoroutine(Utils.DelayRun(() => {
                    //nextSetp++;//开始下一步
                    getEffectTextByQualiy().gameObject.SetActive(true);
                    StartCoroutine(Utils.DelayRun(() => {
                        getEffectTextByQualiy().gameObject.SetActive(false);
                        //nextSetp++;下一步开始
                        newQuality.alpha = 1;
                        TweenScale ts    = TweenScale.Begin(newQuality.gameObject, 0.3f, Vector3.one);
                        ts.method        = UITweener.Method.EaseIn;
                        ts.from          = new Vector3(5, 5, 1);
                        EventDelegate.Add(ts.onFinished, () => {
                            iTween.ShakePosition(transform.parent.gameObject, iTween.Hash("amount", new Vector3(0.03f, 0.03f, 0.03f), "time", 0.4f));
                            iTween.ShakePosition(transform.parent.gameObject, iTween.Hash("amount", new Vector3(0.01f, 0.01f, 0.01f), "time", 0.4f));
                            StartCoroutine(Utils.DelayRun(() => {
                                //nextSetp++;下一步
                                showEvoUI();
                                TweenScale ts1 = TweenScale.Begin(showObj, 0.3f, Vector3.one);
                                ts1.method     = UITweener.Method.EaseIn;
                                ts1.from       = new Vector3(5, 5, 1);
                                EventDelegate.Add(ts1.onFinished, () => {
                                    iTween.ShakePosition(transform.parent.gameObject, iTween.Hash("amount", new Vector3(0.03f, 0.03f, 0.03f), "time", 0.4f));
                                    iTween.ShakePosition(transform.parent.gameObject, iTween.Hash("amount", new Vector3(0.01f, 0.01f, 0.01f), "time", 0.4f));
                                    StartCoroutine(Utils.DelayRun(() => {
                                        if (BloodManagement.Instance.prizes != null && BloodManagement.Instance.prizes.Length > 0)
                                        {
                                            UiManager.Instance.openDialogWindow <BloodEvoWindow>((win => {
                                                win.Initialize(BloodManagement.Instance.prizes);
                                            }));
                                        }
                                        //nextSetp++;
                                        //initInfo();//初始化下一级突破条件以及界面
                                        MaskWindow.UnlockUI();
                                    }, 0.5f));
                                }, true);
                            }, 1.8f));
                        }, true);
                    }, 1.6f));
                }, 1.5f));
            }, 0.2f));
        }, true);
        return;
    }
Ejemplo n.º 7
0
 /** 更新品质图标 */
 public void updateQualitySprite()
 {
     if (mounts != null)
     {
         qualitySprite.spriteName = QualityManagerment.qualityIDToString(mounts.getQualityId()) + "Bg";
     }
     else
     {
         qualitySprite.spriteName = "";
     }
 }
Ejemplo n.º 8
0
    public void initHeroRoad(int honorGap, int rmbGap)
    {
        this.honorGap       = honorGap;
        this.rmbGap         = rmbGap;
        honorValue.text     = honorGap.ToString();
        rushMoneyValue.text = rmbGap.ToString();
        HeroRoadManagerment.Instance.currentHeroRoad.conquestCount++;
        HeroRoad road = HeroRoadManagerment.Instance.currentHeroRoad;
        Card     card = CardManagerment.Instance.createCard(road.sample.sid);

        ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + card.getImageID(), roadRoleTexture);
        chapterLabel.text          = LanguageConfigManager.Instance.getLanguage("prefabzc16", road.conquestCount.ToString()); //string.Format (chapterLabel.text, road.conquestCount);
        roadRoleQuality.spriteName = QualityManagerment.qualityIDToString(card.getQualityId()) + "Bg";
        NextSetp();
    }
Ejemplo n.º 9
0
    public void updateButton(Card newCard)
    {
        if (newCard == null)
        {
            cleanBtton();
            return;
        }
        else
        {
            card = newCard;
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + card.getImageID(), cardImage);
            quality.spriteName = QualityManagerment.qualityIDToString(card.getQualityId());
            level.text         = card.getLevel() + "";
            sign.spriteName    = CardManagerment.Instance.jobIDToString(card.getJob());
            resetCard();
            calculateAllAttr();

            if (state != null)
            {
                if (ArmyManager.Instance.getAllArmyPlayersIds().Contains(card.uid) || ArmyManager.Instance.getAllArmyAlternateIds().Contains(card.uid))
                {
                    state.gameObject.SetActive(true);
                    state.spriteName = "inTeam";
                    state.width      = 33;
                    state.height     = 53;
                }
                else
                {
                    state.gameObject.SetActive(false);
                }
            }
            if (card != null && win.mainRole.card != null && card.uid == win.mainRole.card.uid)
            {
                setShower(win.mainRole, MAINSELECT);
                win.food.cleanData();
                isChoose = true;
                return;
            }

            if (win.food.card != null && win.food.card.uid == card.uid)
            {
                setShower(win.food, CASTSELECT);
                isChoose = true;
                return;
            }
        }
    }
Ejemplo n.º 10
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();
    }
Ejemplo n.º 11
0
    public void updateStarSoulInfo()
    {
        if (card != null)
        {
            if (inbattle != null)
            {
                inbattle.gameObject.SetActive(!hideInBattle && (ArmyManager.Instance.getAllArmyPlayersIds().Contains(card.uid) || ArmyManager.Instance.getAllArmyAlternateIds().Contains(card.uid)));
            }

            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + card.getIconID().ToString(), icon);
            if (quality != null)
            {
                quality.spriteName = QualityManagerment.qualityIDToString(card.getQualityId());
            }
            if (quality != null)
            {
                quality.gameObject.SetActive(true);
            }
            if (qualityBg != null)
            {
                qualityBg.spriteName = QualityManagerment.qualityIDToBackGround(card.getQualityId());
                qualityBg.gameObject.SetActive(true);
            }
            //jobBg.gameObject.SetActive(true);
            if (job != null)
            {
                job.text = CardManagerment.Instance.jobIDToString(card.getJob());
            }
            if (job != null)
            {
                job.gameObject.SetActive(true);
            }
            level.text = "Lv." + card.getLevel();
            level.gameObject.SetActive(true);
            updateEvoLevel();
            showEffectByQuality(card.getQualityId());
        }
    }
    void Update()
    {
        if (canRefresh == true)
        {
            if (step == nextSetp)
            {
                return;
            }
            if (step == 0)
            {
                background.gameObject.SetActive(true);
                showObjEff.SetActive(true);
                effectCard.init(mainCardOld, this, null);
                Card newCard = StorageManagerment.Instance.getRole(mainCardOld.uid);
                newQuality.spriteName = QualityManagerment.qualityIDToString(quNum) + "Bg";
                ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + newCard.getImageID(), effectCard.icon);

                TweenPosition tp = TweenPosition.Begin(effectCard.gameObject, 0.3f, effectCard.transform.localPosition);
                tp.from = new Vector3(500, effectCard.transform.localPosition.y, 0);
                EventDelegate.Add(tp.onFinished, () => {
                    StartCoroutine(Utils.DelayRun(() => {
                        nextSetp++;
                    }, 0.2f));
                }, true);
            }

            else if (step == 1)
            {
                NGUITools.AddChild(effectCard.gameObject, getEffectByQualiy().gameObject);
                StartCoroutine(Utils.DelayRun(() => {
                    nextSetp++;
                }, 1.5f));
            }

            else if (step == 2)
            {
                getEffectTextByQualiy().gameObject.SetActive(true);
                StartCoroutine(Utils.DelayRun(() => {
                    getEffectTextByQualiy().gameObject.SetActive(false);
                    nextSetp++;
                }, 1.6f));
            }

            else if (step == 3)
            {
                newQuality.alpha = 1;
                TweenScale ts = TweenScale.Begin(newQuality.gameObject, 0.3f, Vector3.one);
                ts.method = UITweener.Method.EaseIn;
                ts.from   = new Vector3(5, 5, 1);

                EventDelegate.Add(ts.onFinished, () => {
                    iTween.ShakePosition(transform.parent.gameObject, iTween.Hash("amount", new Vector3(0.03f, 0.03f, 0.03f), "time", 0.4f));
                    iTween.ShakePosition(transform.parent.gameObject, iTween.Hash("amount", new Vector3(0.01f, 0.01f, 0.01f), "time", 0.4f));
                    StartCoroutine(Utils.DelayRun(() => {
                        nextSetp++;
                    }, 1.8f));
                }, true);
            }

            else if (step == 4)
            {
                showEvoUI();

                TweenScale ts = TweenScale.Begin(showObj, 0.3f, Vector3.one);
                ts.method = UITweener.Method.EaseIn;
                ts.from   = new Vector3(5, 5, 1);

                EventDelegate.Add(ts.onFinished, () => {
                    iTween.ShakePosition(transform.parent.gameObject, iTween.Hash("amount", new Vector3(0.03f, 0.03f, 0.03f), "time", 0.4f));
                    iTween.ShakePosition(transform.parent.gameObject, iTween.Hash("amount", new Vector3(0.01f, 0.01f, 0.01f), "time", 0.4f));
//					string[] strs = SurmountManagerment.Instance.getAddEffectByString(mainCard);
//
//					if(strs == null)
//						return;
//
//					for (int i = 0; i < strs.Length; i++) {
//						UiManager.Instance.createMessageLintWindow(strs[i]);
//					}
                    StartCoroutine(Utils.DelayRun(() => {
                        nextSetp++;
                        initInfo();                        //初始化下一级突破条件以及界面
                        MaskWindow.UnlockUI();
                    }, 0.5f));
                }, true);
            }

            step++;
        }
    }
Ejemplo n.º 13
0
    public void updateInfo()
    {
        if (card != null)
        {
            if (inbattle != null)
            {
                inbattle.gameObject.SetActive(!hideInBattle && (ArmyManager.Instance.getAllArmyPlayersIds().Contains(card.uid) || ArmyManager.Instance.getAllArmyAlternateIds().Contains(card.uid)));
            }
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + card.getImageID(), icon);
            if (deathMask != null)
            {
                if (isdeath)
                {
                    deathMask.gameObject.SetActive(true);
                    deathMask.gameObject.transform.localScale = new Vector3(1.4f, 1.4f, 1);
//					icon.color = Color.blue;
                }
                else
                {
                    deathMask.gameObject.SetActive(false);
//					icon.color = Color.white;
                }
            }
            if (quality != null)
            {
                quality.spriteName = QualityManagerment.qualityIDToString(card.getQualityId());
            }
            if (quality != null)
            {
                quality.gameObject.SetActive(true);
            }
            if (qualityBg != null)
            {
                qualityBg.spriteName = QualityManagerment.qualityIDToBackGround(card.getQualityId());
            }
            if (qualityBg != null)
            {
                qualityBg.gameObject.SetActive(true);
            }
            if (job != null)
            {
                job.text = CardManagerment.Instance.jobIDToString(card.getJob());
            }
            if (job != null)
            {
                job.gameObject.SetActive(true);
            }
            if (jobSprite != null)
            {
                jobSprite.gameObject.SetActive(true);
            }
            if (jobSprite != null)
            {
                jobSprite.spriteName = QualityManagerment.qualityIconBgToBackGround(card.getQualityId());
            }
            if (jobTextSprite != null)
            {
                jobTextSprite.gameObject.SetActive(true);
            }
            if (jobTextSprite != null)
            {
                if (fatherWindow is IntensifyCardShowWindow)
                {
                    jobTextSprite.spriteName = CardManagerment.Instance.qualityIconTextToBackGround(card.getJob()) + "s";
                }
                else
                {
                    jobTextSprite.spriteName = CardManagerment.Instance.qualityIconTextToBackGround(card.getJob());
                }
            }
            if (jobBian != null)
            {
                jobBian.gameObject.SetActive(true);
            }
            if (jobBian != null)
            {
                jobBian.spriteName = QualityManagerment.qualityBianToBackGround(card.getQualityId());
            }
            if (levelBg != null)
            {
                levelBg.spriteName = QualityManagerment.qualityBianToBackGround(card.getQualityId());
            }
            if (level != null)
            {
                level.text = "Lv." + card.getLevel(); level.gameObject.SetActive(true);
            }
            updateEvoLevel();
            showEffectByQuality(card.getQualityId());
            showStar();
        }
        else if (sample != null)
        {
            if (inbattle != null)
            {
                inbattle.gameObject.SetActive(false);
            }
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + sample.imageID, icon);
            if (quality != null)
            {
                quality.spriteName = QualityManagerment.qualityIDToString(sample.qualityId);
            }
            if (qualityBg != null)
            {
                qualityBg.spriteName = QualityManagerment.qualityIDToBackGround(sample.qualityId);
            }
            if (job != null)
            {
                job.text = CardManagerment.Instance.jobIDToString(sample.job);
            }
            if (jobSprite != null)
            {
                jobSprite.spriteName = QualityManagerment.qualityIconBgToBackGround(sample.qualityId);
            }
            if (jobTextSprite != null)
            {
                if (fatherWindow is IntensifyCardShowWindow)
                {
                    jobTextSprite.spriteName = CardManagerment.Instance.qualityIconTextToBackGround(sample.job) + "s";
                }
                else
                {
                    jobTextSprite.spriteName = CardManagerment.Instance.qualityIconTextToBackGround(sample.job);
                }
            }
            if (levelBg != null)
            {
                levelBg.spriteName = QualityManagerment.qualityBianToBackGround(sample.qualityId);
            }
            level.text = "Lv." + sample.maxLevel.ToString();             //starLevel;//"Lv.1";
            showStar();
        }
    }
Ejemplo n.º 14
0
    private void playAnimation()
    {
        if (setp == nextSetp)
        {
            return;
        }
        //放狗
        if (setp == 0)
        {
            EffectManager.Instance.CreateEffectCtrlByCache(goddess.gameObject.transform, "Effect/UiEffect/SummonBeast", (obj, ec) => {
                ec.transform.localPosition = new Vector3(0, goddess.transform.localPosition.y - 300, 0);
            });
            StartCoroutine(Utils.DelayRun(() =>
            {
                iTween.ValueTo(gameObject, iTween.Hash("delay", 0.3f, "from", 0, "to", 1f, "easetype", iTween.EaseType.easeInCubic, "onupdate", "colorChange", "time", 0.4f));

                StartCoroutine(Utils.DelayRun(() =>
                {
                    NextSetp();
                }, 2f));
            }, 1f));
        }
        //骂街
        else if (setp == 1)
        {
            msg.SetActive(true);
            TweenPosition tp = TweenPosition.Begin(msg, 0.3f, msg.transform.localPosition);
            tp.from = new Vector3(msg.transform.localPosition.x, -500, msg.transform.localPosition.z);
            EventDelegate.Add(tp.onFinished, () =>
            {
                NextSetp();
            }, true);
        }
        //卡片扑过去
        else if (setp == 2)
        {
            AwardCache ac = AwardsCacheManager.getAwardCache(AwardManagerment.AWARDS_STAR_PRAY);

            Award aw = ac.getAward();
            if (aw == null)
            {
                NextSetp();
                return;
            }
            float delay = 0.0f;
            Card  card;
            foreach (CardAward each in aw.cards)
            {
                StartCoroutine(Utils.DelayRun(() =>
                {
                    cardMove.transform.localPosition = beginMove;
                    card = CardManagerment.Instance.createCard(each.sid);
                    ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + card.getImageID(), roleMove);
                    qualityMove.spriteName = QualityManagerment.qualityIDToString(card.getQualityId());
                    cardMove.SetActive(true);
                    TweenPosition tp = TweenPosition.Begin(cardMove, 0.8f, cardStop.transform.localPosition);
                    tp.from          = beginMove;
                    TweenScale ts    = TweenScale.Begin(cardMove, 0.8f, Vector3.one);
                    ts.from          = Vector3.zero;
                    EventDelegate.Add(tp.onFinished, () =>
                    {
                        ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + card.getImageID(), roleStop);
                        qualityStop.spriteName = QualityManagerment.qualityIDToString(card.getQualityId());

                        cardMove.transform.localScale = Vector3.zero;
                        cardMove.SetActive(false);
                        cardStop.SetActive(true);
                    });
                }, delay));
                delay += 1.2f;
            }

            StartCoroutine(Utils.DelayRun(() =>
            {
                NextSetp();
            }, delay));
        }

        //扑过去的都扑街了
        else if (setp == 3)
        {
            TweenScale ts = TweenScale.Begin(cardStop, 0.8f, Vector3.zero);
            ts.from = Vector3.one;
            EventDelegate.Add(ts.onFinished, () =>
            {
                isPlayAnimation = false;
                goddess.color   = Color.black;
                msg.SetActive(false);
                cardStop.SetActive(false);
                cardStop.transform.localScale = Vector3.one;
                MaskWindow.UnlockUI();
            });
        }

        ++setp;
    }
Ejemplo n.º 15
0
    public void updateButton(Card newCard, int type)
    {
        showType = type;
        card     = newCard;
        if (newCard == null)
        {
            if (IsAlternate)
            {
                ArmyManager.Instance.ActiveEditArmy.alternate [index] = "0";
            }
            else
            {
                ArmyManager.Instance.ActiveEditArmy.players [index] = "0";
            }
            cleanBtton();
            return;
        }
        else
        {
            if (showType == TYPE_TEAMEDIT)
            {
                if (IsAlternate)
                {
                    ArmyManager.Instance.ActiveEditArmy.alternate [index] = newCard.uid;
                }
                else
                {
                    ArmyManager.Instance.ActiveEditArmy.players [index] = newCard.uid;
                }
            }
            if (noCardSprite != null)
            {
                noCardSprite.gameObject.SetActive(false);
            }
            cardImage.gameObject.SetActive(true);
            quality.gameObject.SetActive(true);
            if (levelBg != null)
            {
                levelBg.gameObject.SetActive(true);
            }
            card = newCard;
            calculateAllAttr();
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + card.getImageID(), cardImage);
            cardImage.gameObject.SetActive(true);
            quality.spriteName = QualityManagerment.qualityIDToString(card.getQualityId());
            level.text         = "Lv." + card.getLevel();
            sign.gameObject.SetActive(true);
            sign.spriteName = CardManagerment.Instance.jobIDToString(card.getJob());
            if (dizuo != null)
            {
                dizuo.spriteName = QualityManagerment.qualityIDToBackGround(card.getQualityId());
            }

            if (state != null)
            {
                if (ArmyManager.Instance.getAllArmyPlayersIds().Contains(card.uid) || ArmyManager.Instance.getAllArmyAlternateIds().Contains(card.uid))
                {
                    state.gameObject.SetActive(true);
                    state.spriteName = "inTeam";
                    state.width      = 33;
                    state.height     = 53;
                }
                else
                {
                    state.gameObject.SetActive(false);
                }
            }
        }
    }