Ejemplo n.º 1
0
        private static void DisposingSlot(object[] parameters)
        {
#if DEBUG
            if (DebugMode)
            {
                Debug.Log("FontMapper>DisposingSlot");
            }
#endif
            _mappers.Clear();
            _defaultMapper = null;
            _initialized   = false;
        }
Ejemplo n.º 2
0
        private static void Initialize()
        {
#if DEBUG
            if (DebugMode)
            {
                Debug.Log("Initializing FontMapper");
            }
#endif
            _mappers = new Dictionary <string, FontMapper>();

            Object[] mappers = FindObjectsOfType(typeof(FontMapper));

#if DEBUG
            if (DebugMode)
            {
                Debug.Log(string.Format("   -> Found {0} FontMappers", mappers.Length));
            }
#endif
            foreach (Object o in mappers)
            {
                FontMapper mapper = (FontMapper)o;

                if (mapper.Default)
                {
                    if (null != _defaultMapper)
                    {
                        Debug.LogWarning("Duplicated default font mapper");
                    }

                    _defaultMapper = mapper;
                }

                if (!string.IsNullOrEmpty(mapper.Id))
                {
                    if (_mappers.ContainsKey(mapper.Id))
                    {
                        Debug.LogWarning("Duplicated font mapper for: " + mapper.Id);
                    }
                    else
                    {
                        _mappers.Add(mapper.Id, mapper);
                    }
                }
            }

            _initialized = true;
        }
Ejemplo n.º 3
0
        private static void DisposingSlot(object[] parameters)
        {
#if DEBUG
            if (DebugMode)
            {
                Debug.Log("FontMapper>DisposingSlot");
            }
#endif
            _mappers.Clear();
            _defaultMapper = null;
            _initialized = false;
        }
Ejemplo n.º 4
0
        private static void Initialize()
        {
#if DEBUG
            if (DebugMode)
            {
                Debug.Log("Initializing FontMapper");
            }
#endif
            _mappers = new Dictionary<string, FontMapper>();

            Object[] mappers = FindObjectsOfType(typeof(FontMapper));

#if DEBUG
            if (DebugMode)
            {
                Debug.Log(string.Format("   -> Found {0} FontMappers", mappers.Length));
            }
#endif
            foreach (Object o in mappers)
            {
                FontMapper mapper = (FontMapper)o;
                
                if (mapper.Default)
                {
                    if (null != _defaultMapper)
                        Debug.LogWarning("Duplicated default font mapper");
                    
                    _defaultMapper = mapper;
                }
                
                if (!string.IsNullOrEmpty(mapper.Id)){

                    if (_mappers.ContainsKey(mapper.Id))
                        Debug.LogWarning("Duplicated font mapper for: " + mapper.Id);
                    else
                        _mappers.Add(mapper.Id, mapper);
                }
            }

            _initialized = true;
        }