private void DisplayActionInfo(Unit unit, Units.Actions.Action action, int index) { this.currentUnit = unit; this.currentAction = action; this.actionIndex = index; if (this.currentAction == null || this.currentUnit == null) { return; } IStringBuilder stringBuilder = new ActionInfoStringBuilder(action); text.text = stringBuilder.GetString(); ShowPanel(true); EnableButton(); purchaseButton?.gameObject.SetActive(!currentAction.IsUnlocked()); }
public static bool ReadyToUnlock(Units.Actions.Action action, int experiencePoints) { return(!action.IsUnlocked() && action.ExperiencePointsToUnlocked <= experiencePoints); }