Nez.Portable/Utils/NezContentManager.cs
/// <summary>
/// loads an embedded Nez effect. These are any of the Effect subclasses in the Nez/Graphics/Effects folder.
/// Note that this will return a unique instance if you attempt to load the same Effect twice to avoid Effect duplication.
/// </summary>
/// <returns>The nez effect.</returns>
/// <typeparam name="T">The 1st type parameter.</typeparam>
loads an embedded Nez effect. These are any of the Effect subclasses in the Nez/Graphics/Effects folder.
Note that this will return a unique instance if you attempt to load the same Effect twice to avoid Effect duplication.
loads an embedded Nez effect . These are any of the Effect subclasses in the Nez / Graphics / Effects folder . Note that this will return a unique instance if you attempt to load the same Effect twice to avoid Effect duplication .
public T loadNezEffect<T>()
            where T : Effect, new()
        {
            var cacheKey = typeof(T).Name + "-" + Utils.randomString(5);
            var effect = new T();
            _loadedEffects[cacheKey] = effect;
            return effect;
        }
public T loadNezEffect < T > ( ) where T : Effect , new ( ) { var cacheKey = typeof ( T ) . Name + " " + Utils . randomString ( 5 ) ; var effect = new T ( ) ; _loadedEffects [ cacheKey ] = effect ; return effect ; }
loads an embedded Nez effect.
loads an embedded Nez effect .
The nez effect.
The nez effect .
typeparam
The 1st type parameter.
The 1st type parameter .