private IEnumerator UpgradeSequence_C(Upgrade _newAbilityLevel) { isNavigationAllowed = false; yield return(new WaitForSecondsRealtime(0.5f)); TextMeshProUGUI i_concernedtext = null; switch (_newAbilityLevel) { case Upgrade.Base: i_concernedtext = descriptionMainText; selectedAbility.isBaseUnlocked = true; break; case Upgrade.Upgrade1: i_concernedtext = descriptionUpgrade1; selectedAbility.isUpgrade1Unlocked = true; break; case Upgrade.Upgrade2: i_concernedtext = descriptionUpgrade2; selectedAbility.isUpgrade2unlocked = true; break; default: break; } i_concernedtext.alpha = 1; float animTime = 1.5f; while (animTime > 0) { i_concernedtext.outlineWidth = 0.3f * newUpgradeTextVariation.Evaluate(1 - (animTime / 1.5f)); animTime -= Time.unscaledDeltaTime; yield return(null); } i_concernedtext.outlineWidth = 0.147f; GetAvailableAbilitiesDatas(); organizer.OrganizeAbilities(); DisplayAbility(); yield return(new WaitForSecondsRealtime(0.5f)); isNavigationAllowed = true; }
public override void OnInspectorGUI() { DrawDefaultInspector(); AbilityListOrganizer myScript = (AbilityListOrganizer)target; if (GUILayout.Button("Organize Abilities")) { myScript.OrganizeAbilities(); } }