public static void SelectArmy(Army sel) { army = sel; army.Selected(true); ArmyPanel.Show(true); DeselectShip(); }
public static void DeselectArmy() { army?.Selected(false); army = null; if (CastingSkill) { StopCastSkill(); } ArmyPanel.Show(false); }
public static void Show(bool show) { curArmy = Player.army == null? curArmy : Player.army; show &= curArmy != null; Instance.gameObject.SetActive(show); if (curArmy) { Instance.Person = curArmy.Person; MenuManager.CheckExchangeRegiment(); if (show) { Instance.Show(); curArmy.HitAction += Instance.UpdateArmy; curArmy.ArmyListChange += Instance.UpdateArmy; curArmy.Person.ExpChanged += Instance.UpdatePropertyAndSkills; curArmy.Person.SkillCulldowned += Instance.UpdatePropertyAndSkills; } else { curArmy.HitAction -= Instance.UpdateArmy; curArmy.ArmyListChange -= Instance.UpdateArmy; curArmy.Person.ExpChanged -= Instance.UpdatePropertyAndSkills; curArmy.Person.SkillCulldowned -= Instance.UpdatePropertyAndSkills; } for (int i = 0; i < curArmy.Person.Skills.Length; i++) { if (show) { curArmy.Person.Skills[i].ButtonUpdate += Instance.skillsButton[i].UpdateState; } else { curArmy.Person.Skills[i].ButtonUpdate -= Instance.skillsButton[i].UpdateState; } } } }