private void SetPanelInfo() { var m_HeroDataModel = PlayerManager.Instance.FindHeroDataModel(); int vocationID = m_HeroDataModel.PlayerValues.PlayerCommonValue.PLAYER_FIELD_VISIBLE_VOCATION; VocationSprite.ChangeSprite(vocationID); if (IsResidentUI) { int fashionID = m_HeroDataModel.PlayerValues.PlayerCommonValue.PLAYER_FIELD_VISIBLE_FASHION; var resData = CommonDefineManager.Instance.CommonDefineFile._dataTable.HeroIcon_TownAndTeam.FirstOrDefault(P => P.VocationID == vocationID && P.FashionID == fashionID); if (resData == null) { TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "找不到角色头像,fashionID:" + fashionID); } HeadIconSprite.spriteName = resData.ResName; //HeadIconSprite.ChangeSprite(m_HeroDataModel.PlayerValues.PlayerCommonValue.PLAYER_FIELD_VISIBLE_VOCATION); } NameLabel.SetText(m_HeroDataModel.Name); LevelLabel.SetText(string.Format("LV." + m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_LEVEL)); float newExpValue = (float)m_HeroDataModel.PlayerValues.PLAYER_FIELD_EXP / (float)m_HeroDataModel.PlayerValues.PLAYER_FIELD_NEXT_LEVEL_EXP; if (currentExp != newExpValue) { if (TweenFloatObj_Exp != null) { DestroyImmediate(TweenFloatObj_Exp); } TweenFloatObj_Exp = TweenFloat.Begin(1, currentExp, newExpValue, SetExpBar); } int newGoldMoney = m_HeroDataModel.PlayerValues.PLAYER_FIELD_BINDPAY; if (currentGoldMoney != newGoldMoney) { if (TweenFloatObj_GoldMoney != null) { DestroyImmediate(TweenFloatObj_GoldMoney); } TweenFloatObj_GoldMoney = TweenFloat.Begin(1, currentGoldMoney, newGoldMoney, showGoldMoneyLabel); } int newCoppercoin = m_HeroDataModel.PlayerValues.PLAYER_FIELD_HOLDMONEY; if (currentCoppercoin != newCoppercoin) { if (TweenFloatObj_Coppercoin != null) { DestroyImmediate(TweenFloatObj_Coppercoin); } TweenFloatObj_Coppercoin = TweenFloat.Begin(1, currentCoppercoin, newCoppercoin, ShowCopperCoinLabel); } int newEnegry = m_HeroDataModel.PlayerValues.PLAYER_FIELD_CURRENCY_ACTIVELIFE; if (currentEnegry != newEnegry) { if (TweenFloatObj_Enegry != null) { DestroyImmediate(TweenFloatObj_Enegry); } TweenFloatObj_Enegry = TweenFloat.Begin(1, currentEnegry, newEnegry, ShowEnegryLabel); } }
public void Awake() { _canvasGroup = gameObject.GetOrAddComponent <CanvasGroup>(); _canvasGroup.alpha = 0f; _tweenAlpha = new TweenFloat(); }
public override void RecoverMyself(float RecoverTime) { if (this.RecoverFloatObj != null) { Destroy(this.RecoverFloatObj); } if (m_CDTimeTweenObj != null) { Destroy(m_CDTimeTweenObj); } RecoveSprite.fillAmount = 0; RecoverFloat = 0; if (skillButtonStatus == SkillButtonStatus.MPNotEnough && RecoverTime == 0) { return; } int fromValue = BarCutDownMode == Battle.BarCutDownMode.MaxToMin ? 1 : 0; int toValue = BarCutDownMode == Battle.BarCutDownMode.MaxToMin ? 0 : 1; //Debug.LogWarning(string.Format("冷却技能:{0}=>{1}", fromValue, toValue)); if (EffectsObj != null) { Destroy(EffectsObj); } this.RecoverFloatObj = TweenFloat.Begin(RecoverTime, fromValue, toValue, SetRecoverFloat, this.PlayEffects); m_CDTimeTweenObj = TweenFloat.Begin(RecoverTime, RecoverTime, 0, ShowCDTime, ShowCDTimeOver); if (RecoverTime > 0) { Label_CDTime.gameObject.SetActive(true); } }
/// <summary> /// 设置抛物线(贝塞尔曲线) /// </summary> public void SetCurve(Vector3 end, float time, float hight) { if (m_object != null) { TweenCurve cur = TweenCurve.Get(m_object); cur.duration = time * 0.001f; cur.from = GetPos(); cur.front = new Vector3(0, hight, 0); cur.back = new Vector3(0, hight, 0); cur.to = end; cur.method = UITweener.Method.Linear; cur.Reset(); cur.Play(true); TweenFloat rota = TweenFloat.Get(m_object); rota.duration = time * 0.001f; rota.from = 0; rota.to = -360; rota.method = UITweener.Method.EaseOut; rota.Reset(); rota.Play(true); rota.FloatUpdateEvent = (val) => { SetDirection(val * Vector3.one); }; } }
public static GameObject Begin(float Duration, float fromValue, float ToValue, ChangeValueDelegate changeValueDelegate) { if (fromValue == ToValue) { if (changeValueDelegate != null) { changeValueDelegate(ToValue); } return(null); } GameObject TweenObj = new GameObject(); TweenObj.name = "TweenFloatObj"; TweenObj.AddComponent <TweenFloat>(); TweenFloat tweenFloat = TweenObj.GetComponent <TweenFloat>(); tweenFloat.AddNumber = (ToValue - fromValue) / Duration; tweenFloat.FromValue = fromValue; tweenFloat.ToValue = ToValue; tweenFloat.changeValueDelegate = changeValueDelegate; if (fromValue < ToValue) { tweenFloat.IsAdd = true; } else { tweenFloat.IsAdd = false; } return(TweenObj); }
//bool Isalive = false; public void SetPanelAttribute(SMsgTeamPropMember_SC sMsgTeamPropMember_SC) { //TraceUtil.Log("显示队友状态:" + sMsgTeamPropMember_SC.TeamMemberContext.szName); //Debug.LogWarning("HP" + sMsgTeamPropMember_SC.TeamMemberContext.nCurHP + "," + sMsgTeamPropMember_SC.TeamMemberContext.nMaxHP); this.sMsgTeamPropMember_SC = sMsgTeamPropMember_SC; int vocation = sMsgTeamPropMember_SC.TeamMemberContext.byKind; string TeammateName = sMsgTeamPropMember_SC.TeamMemberContext.szName; float TeammateHP = sMsgTeamPropMember_SC.TeamMemberContext.nCurHP; float TeammateMP = sMsgTeamPropMember_SC.TeamMemberContext.nCurMP; int Level = sMsgTeamPropMember_SC.TeamMemberContext.nLev; //HeadIcon.ChangeSprite(vocation); Profession.ChangeSprite(vocation); this.TeammateName.text = TeammateName; this.TeammateLv.text = Level.ToString(); if (currentHP != TeammateHP) { TweenFloat.Begin(1, currentHP, TeammateHP, SetTeammateHP); currentHP = TeammateHP; } if (currentMP != TeammateMP) { TweenFloat.Begin(1, currentMP, TeammateMP, SetTeammateMP); currentMP = TeammateMP; } SetRoleStatus(currentHP <= 0 ? false : true); }
private void PlayerShardEffect(int monsterID) { if (!m_isFlag) { return; } if (m_shardProgressEffect != null) { DestroyImmediate(m_shardProgressEffect); } SoundManager.Instance.PlaySoundEffect("Sound_UIEff_DefenseBurst"); //恢复效果 var monsterData = BattleConfigManager.Instance.GetMonsterData(monsterID); m_shardTweenGO = TweenFloat.Begin(CommonDefineManager.Instance.CommonDefine.BossDef_WeakTime, 0, 1f, ReadyToRecoverShardValue, ReadyToRecoverShardValueOver); m_monsterBreakTime = monsterData.m_breaktime / 1000; TraceUtil.Log(SystemModel.Lee, TraceLevel.Verbose, (monsterData.m_breaktime + CommonDefineManager.Instance.CommonDefine.BossDef_WeakTime).ToString()); //破防动画 GameObject eff_defense = UI.CreatObjectToNGUI.InstantiateObj(Eff_BreakDefense_Prefab, PopupObjManager.Instance.UICamera.transform); eff_defense.AddComponent <DestroySelf>(); //发出Boss破防消息 RaiseEvent(EventTypeEnum.BossBreakProtectForGuide.ToString(), null); //m_shardProgressEffect.transform.localPosition = new Vector3(-208, -49, -3); ShardProgressBar.enabled = false; ShardBarFrame.enabled = false; m_isFlag = false; }
public static void SettleResultForTime(EntityModel entityModel, string content, FightEffectType fightEffectType) { PopUpInfoList.Enqueue(new PopUpInfo() { entityModel = entityModel, content = content, fightEffectType = fightEffectType }); TweenFloat.Begin(1, 0, 1, null, PopUpForTime); }
// void TweenShowPanel01Value02(object obj) // { // SoundManager.Instance.PlaySoundEffect("Sound_UIEff_AppraisalFields"); // TweenFloat.Begin(TweenAnimTime,0,this.sMSGEctypeSettleAccounts.dwKillPercent,SetDoubleKillLabel,TweenShowPanel01Value03); // } // void SetDoubleKillLabel(float value) // { // DoubleKillLabel.SetText((int)value); // DoubleKillSlider.sliderValue = value / 100f; // } void TweenShowPanel01Value03(object obj) { SoundManager.Instance.PlaySoundEffect("Sound_UIEff_AppraisalFields"); int atk = HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_FIGHTING); TweenFloat.Begin(TweenAnimTime, 0, atk, SetForceLabel, null); DoForTime.DoFunForTime(TweenAnimTime, TweenShowPanel02Value01, null); }
public void TweeenClose() { if (TweenFloatObj != null) { DestroyImmediate(TweenFloatObj); } TweenFloatObj = TweenFloat.Begin(animTime, m_UIDraggablePanel.transform.localPosition.y, startPosY, SetDraggablePanelPosition); }
public override void RecoverMyself(float RecoverTime) { if (this.RecoverFloatObj != null) { Destroy(this.RecoverFloatObj); } this.RecoverFloatObj = TweenFloat.Begin(RecoverTime, 1, 0, SetRecoverFloat, this.PlayEffects); }
public void TweenClose() { if (TweenFloatObj != null) { DestroyImmediate(TweenFloatObj); } TweenFloatObj = TweenFloat.Begin(AnimTime, 1, 0, SetMyPanelsAlpha); TweenPosition.Begin(gameObject, AnimTime, ShowPos, HidePos); }
void Awake() { _canvasGroup = Target.GetOrAddComponent <CanvasGroup>(); _tweenFloat = gameObject.AddComponent <TweenFloat>(); _tweenFloat.Duration = Duration; _tweenFloat.OnDone += OnTweenDone; _tweenFloat.OnTweenValue += OnTween; }
private void ShowOut() { float animTime = 0.1f; TweenPosition.Begin(LeftPanel, animTime, m_startPos_LeftPanel, m_startPos_LeftPanel + Vector3.left * 200); TweenPosition.Begin(RightPanel, animTime, m_startPos_RightPanel, m_startPos_RightPanel + Vector3.right * 200); //UIPanel uiPanel = gameObject.GetComponent<UIPanel>(); TweenFloat.Begin(animTime, 1, 0, SetMyPanelAlpha, ClosePanel); }
//void OnGUI() //{ // GUILayout.Label(CurrentHP.ToString()); //} public void SetHeroStatus()//此处设置主角显示的所有状态 { RollStrengthTrough.UpdateMaxValue(); PlayerValue = PlayerManager.Instance.FindHeroDataModel().PlayerValues; UnityValue = PlayerManager.Instance.FindHeroDataModel().UnitValues; //TraceUtil.Log("获取玩家职业:" + PlayerValue.PlayerCommonValue.PLAYER_FIELD_VISIBLE_VOCATION); //TraceUtil.Log("获取玩家HP:" + UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_CURHP); //TraceUtil.Log(string.Format("获取玩家MP:{0}/{1}" , UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_CURHP,UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_MAXHP)); //if (CurrentVocation != PlayerValue.PlayerCommonValue.PLAYER_FIELD_VISIBLE_VOCATION) //{ // HeadIcon.ChangeSprite(PlayerValue.PlayerCommonValue.PLAYER_FIELD_VISIBLE_VOCATION); // CurrentVocation = PlayerValue.PlayerCommonValue.PLAYER_FIELD_VISIBLE_VOCATION; //} if (LevelNum != null) { this.LevelNum.text = UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_LEVEL.ToString(); } //if (CurrentHP != UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_CURHP) //{ m_TweenHP = TweenFloat.Begin(1, CurrentHP, UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_CURHP, ChangeHp); CurrentHP = UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_CURHP; if (GO_HP != null) { float MaxHp = UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_MAXHP; float hpValue = CurrentHP / MaxHp; GO_HP.transform.localScale = new Vector3(m_HPScale.x * hpValue, m_HPScale.y, m_HPScale.z); //GO_HP.transform.localScale = Vector3.one; } //} //if (CurrentMP != UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_CURMP) //{ m_TweenMP = TweenFloat.Begin(1, CurrentMP, UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_CURMP, ChangeMP); CurrentMP = UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_CURMP; if (GO_MP != null) { float MaxMP = UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_MAXMP; float mpValue = CurrentMP / MaxMP; GO_MP.transform.localScale = new Vector3(m_MPScale.x * mpValue, m_MPScale.y, m_MPScale.z); } //} //if (CurrentEXP != PlayerValue.PLAYER_FIELD_EXP) //{ if (this.EXP != null) { m_TweenEXP = TweenFloat.Begin(1, CurrentEXP, PlayerValue.PLAYER_FIELD_EXP, ChangeEXP); CurrentEXP = PlayerValue.PLAYER_FIELD_EXP; } //} //this.HP.sliderValue = UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_CURHP/UnityValue.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_MAXHP; //this.MP.sliderValue = UnityValue.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_CURMP/UnityValue.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_MAXMP; //this.EXP.sliderValue = PlayerValue.PLAYER_FIELD_EXP/PlayerValue.PLAYER_FIELD_NEXT_LEVEL_EXP; }
public void Awake() { _tweenAlphaIn = new TweenFloat(); _tweenAlphaIn.From = 0f; _tweenAlphaIn.To = 1f; _tweenAlphaOut = new TweenFloat(); _tweenAlphaOut.From = 1f; _tweenAlphaOut.To = 0f; }
void TweenShowPanel01Value01(object obj) { SoundManager.Instance.PlaySoundEffect("Sound_UIEff_AppraisalFields"); var playerData = PlayerManager.Instance.FindHeroDataModel(); int level = playerData.UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_LEVEL; float exp = (float)playerData.PlayerValues.PLAYER_FIELD_EXP / (float)playerData.PlayerValues.PLAYER_FIELD_NEXT_LEVEL_EXP; TweenFloat.Begin(TweenAnimTime, 0, exp, setExp); TweenFloat.Begin(TweenAnimTime, 0, level, SetLevel, TweenShowPanel01Value03); }
static public TweenFloat Get(GameObject go) { TweenFloat tf = go.GetComponent <TweenFloat>(); if (tf == null) { tf = go.AddComponent <TweenFloat>(); } return(tf); }
public void TweenShow() { float animTime = 0.1f; TweenPosition.Begin(gameObject, animTime, IsLeftPos?LeftShowPos:RightShowPos); if (TweenFloatObj != null) { DestroyImmediate(TweenFloatObj); } TweenFloatObj = TweenFloat.Begin(animTime, MyPanelList[0].alpha, 1, SetMyPanelAlpha); }
void TweenShowPanel03Value03(object obj) { SoundManager.Instance.PlaySoundEffect("Sound_UIEff_AppraisalFields"); int minute = (int)this.sMSGEctypeSettleAccounts.dwTime / 1000 / 60; int sconds = (int)this.sMSGEctypeSettleAccounts.dwTime / 1000 % 60; int ms = Random.Range(1, 99); TweenFloat.Begin(TweenAnimTime, 0, minute, SetTimeMinute); TweenFloat.Begin(TweenAnimTime, 0, sconds, SetTimeSconds, TweenShowPanel03Value04); //TweenFloat.Begin(TweenAnimTime,0,ms,SetTimeMs); }
public void Awake() { _canvasGroup = gameObject.GetOrAddComponent <CanvasGroup>(); _canvasGroup.alpha = 0f; _tweenAlpha = new TweenFloat(); _tweenAlpha.Duration = 0.2f; _tweenScale = new TweenVector(); _tweenScale.Duration = 0.1f; }
public void TweenClose() { float animTime = 0.3f; IsShow = false; if (TweenObj != null) { DestroyImmediate(TweenObj); } TweenObj = TweenFloat.Begin(animTime, MyUIPanel.alpha, 0, SetPanelAlpha); TweenPosition.Begin(gameObject, animTime, transform.localPosition, HidePos); }
private void ShowIn() { float animTime = 0.1f; TweenPosition.Begin(LeftPanel, animTime, m_startPos_LeftPanel + Vector3.left * 200, m_startPos_LeftPanel); TweenPosition.Begin(RightPanel, animTime, m_startPos_RightPanel + Vector3.right * 200, m_startPos_RightPanel); //UIPanel uiPanel = gameObject.GetComponent<UIPanel>(); TweenFloat.Begin(animTime, 0, 1, SetMyPanelAlpha); //TweenPosition.Begin(gameObject,animTime,IsLeftPos?LeftShowPos:RightShowPos); //if(TweenFloatObj!=null){DestroyImmediate(TweenFloatObj);} //TweenFloatObj = TweenFloat.Begin(animTime,MyPanelList[0].alpha,1,SetMyPanelAlpha); }
public void Show(int progress, int itemID, int itemNumber, bool isLast, TrialsSettlementpanel_V2 myParent) { this.MyParent = myParent; TraceUtil.Log("获得物品ID:" + itemID); ItemData itemData = ItemDataManager.Instance.GetItemData(itemID); string typeStr = string.Empty; string itemNameStr = string.Empty; switch (itemID) { case 3050001: //铜币 typeStr = LanguageTextManager.GetString(itemData._szGoodsName); itemNameStr = string.Format("+{0}", itemNumber); break; case 3050002: //元宝 typeStr = LanguageTextManager.GetString(itemData._szGoodsName); itemNameStr = string.Format("+{0}", itemNumber); break; case 3050003: //活力 typeStr = LanguageTextManager.GetString(itemData._szGoodsName); itemNameStr = string.Format("+{0}", itemNumber); break; case 3050004: //经验 typeStr = LanguageTextManager.GetString(itemData._szGoodsName); itemNameStr = string.Format("+{0}", itemNumber); break; case 3050005: //妖气值 typeStr = LanguageTextManager.GetString(itemData._szGoodsName); itemNameStr = string.Format("+{0}", itemNumber); break; case 3050006: //修为 typeStr = LanguageTextManager.GetString(itemData._szGoodsName); itemNameStr = string.Format("+{0}", itemNumber); break; default: typeStr = LanguageTextManager.GetString("IDS_H1_558");//道具 itemNameStr = string.Format("{0}X{1}", NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemData._szGoodsName), GetItemColor(itemData)), itemNumber); break; } IsLastSprite.ApplyAllItem(P => P.ChangeSprite(isLast?2:1)); TextColor colortype = isLast ? TextColor.purple : TextColor.white; ProgressLabel.SetText(LanguageTextManager.GetString(string.Format("IDS_H1_{0}", 534 + progress))); TypeLabel.SetText(NGUIColor.SetTxtColor(typeStr, colortype)); ItemNameLabel.SetText(itemNameStr); TweenFloat.Begin(0.3f, 0, 1, SetPanelAlpha); }
void SelectAndMoveToEctypeDiffItem(SingleEctypeDiffItem item, int index) { OnMyChildItemClick(item); //SoundManager.Instance.PlaySoundEffect("Sound_UIEff_EctypeTabFallDown"); if (TweenFloatObj != null) { DestroyImmediate(TweenFloatObj); } int posY = 126 * ((index + 1 < 4 ? 4 : index + 1) - 4); //126*((MyEctypeDiffItemList.Count<4?4:MyEctypeDiffItemList.Count)-4) TweenFloatObj = TweenFloat.Begin(animTime, startPosY, posY, SetDraggablePanelPosition, PlaySound); }
public void TweenClose() { ISShowing = false; float animTime = 0.1f; TweenPosition.Begin(gameObject, animTime, IsLeftPos?LeftHidePos:RightHidePos); if (TweenFloatObj != null) { DestroyImmediate(TweenFloatObj); } TweenFloatObj = TweenFloat.Begin(animTime, MyPanelList[0].alpha, 0, SetMyPanelAlpha, DestroyMySelf); }
public void TweenShow() { float animTime = 0.3f; IsShow = true; if (TweenObj != null) { DestroyImmediate(TweenObj); } TweenObj = TweenFloat.Begin(animTime, MyUIPanel.alpha, 1, SetPanelAlpha); TweenPosition.Begin(gameObject, animTime, transform.localPosition, ShowPos); UpdateAttribute(); }
void AddColdWork(object obj) { ColdWorkInfo myColdWork = (ColdWorkInfo)obj; long targetUID = PlayerManager.Instance.FindHeroDataModel().UID; if (myColdWork.lMasterID == targetUID && myColdWork.ColdClass == ColdWorkClass.ECold_ClassID_MODEL && myColdWork.ColdID == (uint)ColdWorkType.ContainerColdWork) { SetButtonActive(false); TweenFloat.Begin(myColdWork.ColdTime / 1000, 1, 0, SetRecoverProgressBar); EffectPoint.ClearChild(); EffectPoint.InstantiateNGUIObj(EffectPrefab); } }
void GetColdWork() { long targetUID = PlayerManager.Instance.FindHeroDataModel().UID; ColdWorkInfo myColdWork = ColdWorkManager.Instance.GetColdWorkInfo(targetUID, ColdWorkClass.ECold_ClassID_MODEL, (uint)ColdWorkType.ContainerColdWork); if (myColdWork != null) { SetButtonActive(false); TweenFloat.Begin(myColdWork.ColdTime / 1000, 1, 0, SetRecoverProgressBar); EffectPoint.ClearChild(); EffectPoint.InstantiateNGUIObj(EffectPrefab); } }
public void UpdateViaNotify(object inotifyArgs)//设置各种属性 { EntityDataUpdateNotify entityDataUpdateNotify = (EntityDataUpdateNotify)inotifyArgs; if (entityDataUpdateNotify.nEntityClass == TypeID.TYPEID_MONSTER) { SMsgPropCreateEntity_SC_Monster monster = (SMsgPropCreateEntity_SC_Monster)MonsterManager.Instance.GetEntityMode(entityDataUpdateNotify.EntityUID).EntityDataStruct; PlayCutBloodAnimation(monster.UID); //更新血量 if (MonsterManager.Instance.IsMonsterBossType(monster.BaseObjectValues.OBJECT_FIELD_ENTRY_ID)) { if (ShardProgressBar == null) { //防守副本防甲为空 return; } int bossShard = monster.MonsterUnitValues.UNIT_FIELD_SHARD; float shardValue = (float)bossShard / BattleConfigManager.Instance.MonsterConfigList[monster.BaseObjectValues.OBJECT_FIELD_ENTRY_ID].m_shieldpoint; //ShardProgressBar.fillAmount = shardValue; //防护值恢复特效 if (m_previousshardValue == 0 && bossShard >= BattleConfigManager.Instance.MonsterConfigList[monster.BaseObjectValues.OBJECT_FIELD_ENTRY_ID].m_shieldpoint) { PlayRecoverProtectionEff(); } m_previousshardValue = bossShard; TweenFloat.Begin(0.3f, ShardProgressBar.fillAmount, shardValue, ChangeShardProgressBar); if (IsShowStatusLabel) { ShardNumLabel.text = string.Format("{0}/{1}", bossShard, BattleConfigManager.Instance.MonsterConfigList[monster.BaseObjectValues.OBJECT_FIELD_ENTRY_ID].m_shieldpoint); } else { ShardNumLabel.text = ""; } if (shardValue <= 0) { PlayerShardEffect(monster.BaseObjectValues.OBJECT_FIELD_ENTRY_ID); MonsterManager.Instance.GetEntityMode(entityDataUpdateNotify.EntityUID).GO.GetComponent <HurtFlash>().OnDisrupt(true); } else { MonsterManager.Instance.GetEntityMode(entityDataUpdateNotify.EntityUID).GO.GetComponent <HurtFlash>().OnDisrupt(false); ShardProgressBar.enabled = true; ShardBarFrame.enabled = true; m_isFlag = true; } } } }