Beispiel #1
0
        //---------------------------------------------------------------------------

        public T Find <T>(ETilesetAssets asset)
        {
            if (m_TilesetAssets.ContainsKey(typeof(T)))
            {
                if (m_TilesetAssets[typeof(T)].ContainsKey(asset))
                {
                    return((T)m_TilesetAssets[typeof(T)][asset]);
                }
            }
            return(default(T));
        }
Beispiel #2
0
        //---------------------------------------------------------------------------

        public void Store <T>(ETilesetAssets type, string path)
        {
            T asset = Content.Load <T>(path);

            if (!m_TilesetAssets.ContainsKey(typeof(T)))
            {
                m_TilesetAssets.Add(typeof(T), new Dictionary <ETilesetAssets, dynamic>());
            }
            if (!m_TilesetAssets[typeof(T)].ContainsKey(type))
            {
                m_TilesetAssets[typeof(T)].Add(type, asset);
            }
        }