private void RefreshShownValues() { _headerTextMeshProUgui.SetText( string.Format( " <#ffa000><size=125%>{0}</size></color> <sprite={1}>", _upgradeable.GetType().ToString(), _upgradeable.Level)); _slider.value = _upgradeable.Level; }
/// <summary> /// Checks if the given <paramref name="upgrade"/> is compatible /// with the object. /// </summary> /// <param name="obj">Calling object.</param> /// <param name="upgrade">Upgrade to check for compatibility.</param> /// <returns>True if upgrade is compatible, false if not.</returns> public static bool IsUpgradeCompatible(this IUpgradeable obj, IUpgrade upgrade) { return(upgrade.ValidObjects.Contains(obj.GetType())); }