void cleanalternate()
 {
     alternateMedicalButton.gameObject.SetActive(false);
     alternateCardImage.gameObject.SetActive(false);
     alternateCardName.text = "";
     alternate_hpbar.reset();
     alternateHpNum.text  = "";
     alternateExpNum.text = "";
     alternateLv.text     = "";
     alternateCombat.text = "";
     alternate_expbar.reset();
 }
 void cleanPlayer()
 {
     playerMedicalButton.gameObject.SetActive(false);
     playerCardImage.gameObject.SetActive(false);
     playerCardName.text = "";
     player_hpbar.reset();
     playerHpNum.text  = "";
     playerExpNum.text = "";
     playerLv.text     = "";
     playerCombat.text = "";
     player_expbar.reset();
 }
示例#3
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();
        }
    }
示例#4
0
    /*
     * protected void onChangePageHandler (int _currentPageIndex)
     * {
     *      vips = VipManagerment.Instance.getAllVip ();
     *      vipTitleLabel.text = "VIP " + vips [_currentPageIndex].vipLevel + LanguageConfigManager.Instance.getLanguage ("s0314");
     *      showGiftLevel = _currentPageIndex + 1;
     *      updateVipAwardInfo ();
     * }
     *
     * void Start ()
     * {
     *      radioScrollBar.onChangePage = onChangePageHandler;
     *      ResourcesManager.Instance.LoadAssetBundleTexture (UserManager.Instance.self.getIconPath (), icon);
     *      Vip[] vips = VipManagerment.Instance.getAllVip ();
     *      for (int i = 0; i < vipPages.Length && i < vips.Length; i++) {
     *              vipPages [i].vipinfo = vips [i];
     *              vipPages [i].updatePage ();
     *      }
     *      int level = UserManager.Instance.self.getVipLevel ();
     *      if (level > 0) {
     *              Vector3 currentVipPosition = vipPages [level - 1].transform.localPosition;
     *              Vector3 currentViewPosition = transform.localPosition;
     *              currentViewPosition.x = -currentVipPosition.x;
     *              SpringPanel.Begin (scrollView.gameObject, currentViewPosition, 1000f);
     *              sprite_vipIcon.gameObject.SetActive (true);
     *              sprite_vipIcon.spriteName = "vip" + level.ToString ();
     *              sprite_vipIcon.MakePixelPerfect ();
     *      } else {
     *              onChangePageHandler (0);
     *              sprite_vipIcon.gameObject.SetActive (false);
     *      }
     * }
     */
    public void updateInfo()
    {
        UserManager.Instance.setSelfHeadIcon(icon);

        int level = UserManager.Instance.self.getVipLevel();

        if (level > 0)
        {
            sprite_vipIcon.gameObject.SetActive(true);
            sprite_vipIcon.spriteName = "vip" + level;
            sprite_vipIcon.MakePixelPerfect();
        }
        else
        {
            sprite_vipIcon.gameObject.SetActive(false);
        }

        float exp     = (float)UserManager.Instance.self.getVipEXP() - (float)UserManager.Instance.self.getVipEXPDown();
        float expNeed = (float)UserManager.Instance.self.getVipEXPUp() - (float)UserManager.Instance.self.getVipEXPDown();

        if (UserManager.Instance.self.getVipLevel() == 0)
        {
            userVipInfo        = VipManagerment.Instance.getVipbyLevel(1);
            vipLevelLabel.text = LanguageConfigManager.Instance.getLanguage("s0319");
            nextLevelTip.text  = LanguageConfigManager.Instance.getLanguage("s0313", ((int)(expNeed - exp)).ToString(), (UserManager.Instance.self.getVipLevel() + 1).ToString());
        }
        else
        {
            userVipInfo = VipManagerment.Instance.getVipbyLevel(UserManager.Instance.self.vipLevel);
            //当前级别:VIP 1
            vipLevelLabel.text = LanguageConfigManager.Instance.getLanguage("s0317") + ":";             //VIP " + userVipInfo.vipLevel.ToString ();
            if (VipManagerment.Instance.getMaxLevel() == UserManager.Instance.self.vipLevel)
            {
                nextLevelTip.text = LanguageConfigManager.Instance.getLanguage("s0318");
            }
            else
            {
                //s0313|再充值 %1元可成为VIP%2
                nextLevelTip.text = LanguageConfigManager.Instance.getLanguage("s0313", ((int)(expNeed - exp)).ToString(), (UserManager.Instance.self.getVipLevel() + 1).ToString());
            }
        }

        //可能从隐藏回来调用,先重置
        expbar.reset();

        if (expNeed == 0)
        {
            //满级
            expbar.updateValue(1, 1);
            vipExpLabel.text = (int)UserManager.Instance.self.getVipEXP() + "/" + (int)UserManager.Instance.self.getVipEXPUp();
        }
        else
        {
            expbar.updateValue(UserManager.Instance.self.getVipEXP(), UserManager.Instance.self.getVipEXPUp());
            vipExpLabel.text = (int)UserManager.Instance.self.getVipEXP() + "/" + (int)UserManager.Instance.self.getVipEXPUp();
        }

        vipIcon.text = "VIP " + UserManager.Instance.self.vipLevel;
    }
示例#5
0
 public void updateValue(float old, float inc, float max)
 {
     this.now = old + inc;
     this.max = max;
     frontBar.reset();
     incBar.reset();
     if (now != incBar.getNewValue())
     {
         frontBar.updateValue(old, max);
         isActive = true;
     }
 }