예제 #1
0
 public void Reset()
 {
     s_TextureMap.Clear();
     s_SpriteAtlasMap.Clear();
     s_FontMap.Clear();
     s_AudioMap.Clear();
 }
예제 #2
0
        internal void ClearPropertyMap()
        {
            // when clearing the property map we want to retain the styles that we have inherited from elsewhere
            // to do this, we need to read in the inherited values, store them, clear the map, then write the values back
            LightList <StyleProperty> inherited = LightList <StyleProperty> .Get();

            inherited.EnsureCapacity(StyleUtil.InheritedProperties.Count);
            StyleProperty[] inheritedArray = inherited.Array;
            for (int i = 0; i < StyleUtil.InheritedProperties.Count; i++)
            {
                int key = BitUtil.SetHighLowBits(1, (int)StyleUtil.InheritedProperties[i]);
                if (propertyMap.TryGetValue(key, out StyleProperty inheritedValue))
                {
                    inherited.AddUnchecked(inheritedValue);
                }
            }

            propertyMap.Clear();
            // re-apply values
            for (int i = 0; i < inherited.Count; i++)
            {
                int key = BitUtil.SetHighLowBits(1, (int)inheritedArray[i].propertyId);
                propertyMap.Add(key, inheritedArray[i]);
            }

            LightList <StyleProperty> .Release(ref inherited);
        }
예제 #3
0
 public void Close()
 {
     if (colorMap != null)
     {
         colorMap.Clear();
     }
     closed = true;
 }
예제 #4
0
 public void Clear(bool call)
 {
     typemap.Clear();
     groupmap.Clear();
     instmap.Clear();
     if (call)
     {
         all.Clear();
     }
 }