private void HighlightButton() { bool availableToUnlock = SkillStoreController.ReadyToUnlock(action, experiencePoints.Value); HighlightingTypes.Options color = availableToUnlock ? HighlightingTypes.Options.New_Skill_Available : HighlightingTypes.Options.Unavailable; button.image.color = HighlightingTypes.GetColor(color); }
public void EnableButton() { if (currentAction == null || currentUnit == null) { return; } currentAction.AvailableToUnlock = SkillStoreController.ReadyToUnlock(this.currentAction, experiencePoints.Value); Logcat.I(this, $"Is the action available to unlock? {currentAction.AvailableToUnlock}"); purchaseButton.interactable = currentAction.AvailableToUnlock; }
private void TotalExperienceUnlocked() { Unit unit = this.map.GetUnits(Type.Player).Find(u => u?.GetSpawnedUnitType() == this.unitType); if (unit == null) { return; } foreach (var action in unit.ActionsHandler.GetActions()) { if (SkillStoreController.ReadyToUnlock(action, this.experiencePoints.Value)) { this.text.gameObject.SetActive(true); return; } } this.text.gameObject.SetActive(false); }