public void Load()
{
// Unload first
Unload();
// load all textures
for ( int i = 0; i < numFrames; i++ )
{
if ( frames[ i ].Length > 0 )
{
try
{
// ensure the texture is loaded
TextureManager.Instance.Load( frames[ i ], ResourceGroupManager.DefaultResourceGroupName, textureType, textureSrcMipmaps, 1.0f, this.isAlpha, desiredFormat /*, hwGamma */ );
isBlank = false;
}
catch ( Exception ex )
{
LogManager.Instance.Write( "Error loading texture {0}. Layer will be left blank.", frames[ i ] );
LogManager.Instance.Write( ex.ToString() );
isBlank = true;
}
}
}
// Init animated textures
if ( animDuration != 0 )
{
CreateAnimationController();
}
// initialize texture effects
foreach ( TextureEffect effect in effectList )
{
CreateEffectController( effect );
}
}