public void DisplayParty() { Int32 partyIndex = 0; foreach (BattleUnit unit in FF9StateSystem.Battle.FF9Battle.EnumerateBattleUnits()) { if (!unit.IsPlayer) { continue; } Int32 playerId = unit.GetIndex(); UI.PanelParty.Character character = _partyDetail.Characters[partyIndex]; DamageAnimationInfo hp = _hpInfoVal[partyIndex]; DamageAnimationInfo mp = _mpInfoVal[partyIndex]; character.PlayerId = playerId; character.IsActive = true; DisplayCharacterParameter(character, unit, hp, mp); character.TranceBar.IsActive = unit.HasTrance; partyIndex++; } PartyDetailPanel.transform.localPosition = new Vector3(PartyDetailPanel.transform.localPosition.x, DefaultPartyPanelPosY - PartyItemHeight * (_partyDetail.Characters.Count - partyIndex), PartyDetailPanel.transform.localPosition.z); for (; partyIndex < _partyDetail.Characters.Count; ++partyIndex) { _partyDetail.Characters[partyIndex].IsActive = false; _partyDetail.Characters[partyIndex].PlayerId = -1; } }
private void DisplayPartyRealtime() { Int32 index = 0; foreach (BattleUnit unit in FF9StateSystem.Battle.FF9Battle.EnumerateBattleUnits()) { if (!unit.IsPlayer) { continue; } UI.PanelParty.Character character = _partyDetail.Characters[index]; DamageAnimationInfo hp = _hpInfoVal[index]; DamageAnimationInfo mp = _mpInfoVal[index]; index++; DisplayCharacterParameter(character, unit, hp, mp); } }
private void YMenu_ManagerHpMp() { Int32 index1 = 0; foreach (BattleUnit unit in FF9StateSystem.Battle.FF9Battle.EnumerateBattleUnits()) { if (!unit.IsPlayer) { continue; } DamageAnimationInfo infoVal1 = _hpInfoVal[index1]; DamageAnimationInfo infoVal2 = _mpInfoVal[index1]; for (Int32 index2 = 0; index2 < 2; ++index2) { DamageAnimationInfo infoVal3 = index2 != 0 ? infoVal2 : infoVal1; if (infoVal3.FrameLeft != 0) { if (infoVal3.IncrementStep >= 0) { if (infoVal3.CurrentValue + infoVal3.IncrementStep >= infoVal3.RequiredValue) { infoVal3.CurrentValue = infoVal3.RequiredValue; infoVal3.FrameLeft = 0; } else { infoVal3.CurrentValue += infoVal3.IncrementStep; --infoVal3.FrameLeft; } } else if (infoVal3.CurrentValue + infoVal3.IncrementStep <= infoVal3.RequiredValue) { infoVal3.CurrentValue = infoVal3.RequiredValue; infoVal3.FrameLeft = 0; } else { infoVal3.CurrentValue += infoVal3.IncrementStep; --infoVal3.FrameLeft; } } else { Int32 num1 = index2 != 0 ? unit.CurrentMp : (Int32)unit.CurrentHp; Int32 num2 = index2 != 0 ? unit.MaximumMp : (Int32)unit.MaximumHp; Int32 num3; if ((num3 = num1 - infoVal3.CurrentValue) == 0) { continue; } Int32 num4 = Mathf.Abs(num3); infoVal3.RequiredValue = (Int16)num1; if (num4 < YINFO_ANIM_HPMP_MIN) { infoVal3.FrameLeft = num4; } else { infoVal3.FrameLeft = num4 * YINFO_ANIM_HPMP_MAX / num2; if (YINFO_ANIM_HPMP_MIN > infoVal3.FrameLeft) { infoVal3.FrameLeft = YINFO_ANIM_HPMP_MIN; } } infoVal3.IncrementStep = 0 > num3 ? (num3 - (infoVal3.FrameLeft - 1)) / infoVal3.FrameLeft : (num3 + (infoVal3.FrameLeft - 1)) / infoVal3.FrameLeft; } } ++index1; } }