예제 #1
0
        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);
        }
예제 #2
0
        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;
        }
예제 #3
0
        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);
        }