Ejemplo n.º 1
0
 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)));
 }
Ejemplo n.º 2
0
    public void Set <T>(string propertyKey, T valueOverride)
    {
        ConditionalProperty <T> property = GetProperty <T>(propertyKey);

        if (property != null)
        {
            property.Value = valueOverride;
        }
    }
Ejemplo n.º 3
0
        protected void BindProperty(ConditionalProperty source, System.Action action)
        {
            if (source.IsEmpty())
            {
                return;
            }

            _properties.Add(new PropertyApplicator(source, action));
        }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
 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);
 }
Ejemplo n.º 6
0
    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;
         }
     }
 }
Ejemplo n.º 8
0
 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);
 }
Ejemplo n.º 9
0
        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();
        }
Ejemplo n.º 10
0
        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);
        }