Exemplo n.º 1
0
 public void UpdateCounters(EffectParameterUpdaterDefinition definition)
 {
     for (var i = 0; i < definition.SortedLevels.Length; ++i)
     {
         var kvp = GetAtIndex(i);
         definition.SortedCounters[i] = kvp.Value.Counter;
     }
 }
Exemplo n.º 2
0
        public void ComputeLevels(EffectParameterUpdaterDefinition definition)
        {
            var levels = definition.SortedLevels;

            if (levels == null || levels.Length != definition.SortedKeyHashes.Length)
            {
                levels = new int[definition.SortedKeyHashes.Length];
            }

            for (var i = 0; i < levels.Length; ++i)
            {
                levels[i] = GetAtIndex(i).Key;
            }

            definition.SortedLevels = levels;
        }
Exemplo n.º 3
0
 public bool HasChanged(EffectParameterUpdaterDefinition definition)
 {
     for (var i = 0; i < definition.SortedLevels.Length; ++i)
     {
         var kvp = GetAtIndex(i);
         if (definition.SortedLevels[i] == kvp.Key)
         {
             if (definition.SortedCounters[i] != kvp.Value.Counter && !Equals(definition.SortedCompilationValues[i], kvp.Value.Object))
             {
                 return(true);
             }
         }
         else
         {
             if (!Equals(definition.SortedCompilationValues[i], kvp.Value.Object))
             {
                 return(true);
             }
         }
     }
     return(false);
 }