private void UpdatePartsEffects() { SelectedUnit.ResetBoosts(); SelectedUnit.ActivePassiveBuffs(); if (CursorIndexListPart > 0) { SystemList.ListPart.ElementAt(CursorIndexListPart - 1).Value.ActivatePassiveBuffs(); } }
private void UpdatePartsEffects() { SelectedUnit.ResetBoosts(); SelectedUnit.ActivePassiveBuffs(); if (CursorIndexListPart > 0) { GlobalBattleContext.SetContext(null, SelectedUnit, SelectedUnit.Pilot, null, SelectedUnit, SelectedUnit.Pilot, ActiveParser); UnitPart ActivePart = SystemList.ListPart.ElementAt(CursorIndexListPart - 1).Value; ActivePart.ReloadSkills(DicRequirement, DicEffect, DicAutomaticSkillTarget, DicManualSkillTarget); ActivePart.ActivatePassiveBuffs(); } }
private void SelectPartLinkedUnit() { PartInfo ActivePartInfo = ListPartInfo[CursorIndexListPart - 1]; if (InputHelper.InputUpPressed()) { if (CursorIndexListPartUnits > 0) { CursorIndexListPartUnits--; } else { CursorIndexListPartUnits = ActivePartInfo.ListUnit.Count; } UpdatePartsEffects(); } else if (InputHelper.InputDownPressed()) { if (CursorIndexListPartUnits + 1 < ActivePartInfo.ListUnit.Count + 1) { CursorIndexListPartUnits++; } else { CursorIndexListPartUnits = 0; } UpdatePartsEffects(); } else if (InputHelper.InputConfirmPressed()) { Unit LinkedUnit = ActivePartInfo.ListUnit[CursorIndexListPartUnits]; for (int P = 0; P < LinkedUnit.ArrayParts.Length; ++P) { if (LinkedUnit.ArrayParts[P] == ActivePartInfo.ActivePart) { LinkedUnit.ArrayParts[P] = null; } } SelectedUnit.ArrayParts[CursorIndexUnitPart] = ActivePartInfo.ActivePart; ActivePartInfo.ListUnit.Add(SelectedUnit); ActivePartInfo.ListUnit.Remove(LinkedUnit); SelectedUnit.ResetBoosts(); SelectedUnit.ActivePassiveBuffs(); LinkedUnit.ResetBoosts(); LinkedUnit.ActivePassiveBuffs(); GoToPartChange(); } }