public void UpdateHPAni() { if (this.fAniStartTime != 0f) { if (Time.time - this.fAniStartTime < 1.5f) { float t = (Time.time - this.fAniStartTime) / 1.5f; float num = Mathf.Lerp(this.fAniStartHP, this.fAniEndHP, t); this.m_pkDrawTextureHP.SetSize(this.fHpLength * num, this.m_pkDrawTextureHP.GetSize().y); if (this.m_TargetChar.CastedTarget.MyChar) { Battle_CharinfoDlg battle_CharinfoDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CHARINFO_DLG) as Battle_CharinfoDlg; if (battle_CharinfoDlg != null) { battle_CharinfoDlg.UpdateHP((int)this.m_TargetChar.CastedTarget.GetSolIdx()); } } } else { this.fAniEndHP = 0f; this.fAniStartHP = 0f; this.fAniStartTime = 0f; this.UpdateHP(); } } }
public void UpdateHP() { float num3; if (NrTSingleton <MythRaidManager> .Instance.IsMythRaidBossCharKind(this.m_TargetChar.CastedTarget.GetCharKindInfo().GetCharKind())) { float num = (float)Battle.BATTLE.BossCurrentHP; float num2 = (float)Battle.BATTLE.BossMaxHP; if (num > num2) { num = num2; } num3 = num / num2; } else { float num4 = (float)this.m_TargetChar.CastedTarget.GetSoldierInfo().GetHP(); if (num4 > this.MAXHP) { num4 = this.MAXHP; } num3 = num4 / this.MAXHP; } this.m_pkDrawTextureHP.SetSize(this.fHpLength * num3, this.m_pkDrawTextureHP.GetSize().y); if (this.m_TargetChar.CastedTarget.MyChar) { Battle_CharinfoDlg battle_CharinfoDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CHARINFO_DLG) as Battle_CharinfoDlg; if (battle_CharinfoDlg != null) { battle_CharinfoDlg.UpdateHP((int)this.m_TargetChar.CastedTarget.GetSolIdx()); } } }