public void FromConditionalProperty(ConditionalProperty <IEdgeProperty> conditionalProperty) { ConditionControl.FromCondition(conditionalProperty.Condition); _properties.ForEach(x => x.Reset()); conditionalProperty.Properties.ForEach(x => _properties.ForEach(p => p.FromIEdgeProperty(x))); }
public void Set <T>(string propertyKey, T valueOverride) { ConditionalProperty <T> property = GetProperty <T>(propertyKey); if (property != null) { property.Value = valueOverride; } }
protected void BindProperty(ConditionalProperty source, System.Action action) { if (source.IsEmpty()) { return; } _properties.Add(new PropertyApplicator(source, action)); }
private void ApplyPropertyAllStackFramesArgsOnly <T>(IReadOnlyCollection <Identifier> identifiers, ConditionalProperty <T> conditionalProperty, ApplyProperty <T> applyProperty) { ApplyPropertyStackFrame( _debuggerOperations.CheckExpressionAllStackFramesArgsOnly(conditionalProperty.Condition.Template, conditionalProperty.Condition.FunctionNameRegex, identifiers), conditionalProperty.Properties, applyProperty); }
private void ApplyPropertyCurrentStackFrame <T>(IEnumerable <Identifier> identifiers, ConditionalProperty <T> conditionalProperty, ApplyProperty <T> applyProperty) { ApplyPropertyStackFrame( _debuggerOperations.CheckExpression(conditionalProperty.Condition.Template, conditionalProperty.Condition.FunctionNameRegex, identifiers), conditionalProperty.Properties, applyProperty); }
public T Get <T>(string propertyKey, T fallbackValue) { ConditionalProperty <T> property = GetProperty <T>(propertyKey); if (property != null) { return(property.Value); } Log.LogErrorFormatted(this, "Unable to find Property ({0}), using fallback value: {1}", propertyKey, fallbackValue); return(fallbackValue); }
private void Awake() { if (DisableBlobShadows != null) { ConditionalProperty <bool> property = Service.Get <ConditionalConfiguration>().GetProperty <bool>(DisableBlobShadows.name); if (property != null && property.Value) { GetComponent <BlobShadowRenderer>().BlobShadowsSupported = false; } } }
public ConditionalProperty <T> GetProperty <T>(string propertyKey) { if (properties.TryGetValue(propertyKey, out ConditionalProperty value)) { ConditionalProperty <T> conditionalProperty = value as ConditionalProperty <T>; if (conditionalProperty != null) { return(conditionalProperty); } } return(null); }
public void OnDestroy() { ConditionalProperty <int> property = Service.Get <ConditionalConfiguration>().GetProperty <int>(data.QualityIndex.name); property.Tier.EDynamicValueChanged -= OnQualityIndexChanged; weightingRefresher = null; generator = null; if (pool != null) { pool.UnspawnAllObjects(); } pool = null; Requests.Clear(); }
public void Initialize(LODSystemData systemData) { generator = GetComponent <LODGenerator>(); weightingRefresher = GetComponent <LODWeightingRefresher>(); weightingRefresher.enabled = false; data = systemData; generator.Initialize(data.ContentKey, systemData.MaxCount); ConditionalProperty <int> property = Service.Get <ConditionalConfiguration>().GetProperty <int>(systemData.QualityIndex.name); property.Tier.EDynamicValueChanged += OnQualityIndexChanged; weightingRefresher.Initialize(data.RefreshRateSeconds); initializeMetric(); setupObjectPool(generator.MaxCount); }