示例#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)));
 }
示例#2
0
    public void Set <T>(string propertyKey, T valueOverride)
    {
        ConditionalProperty <T> property = GetProperty <T>(propertyKey);

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

            _properties.Add(new PropertyApplicator(source, action));
        }
示例#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);
 }
示例#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);
 }
示例#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;
         }
     }
 }
示例#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);
 }
示例#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();
        }
示例#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);
        }