Exemple #1
0
 /// <summary>
 /// Initializes a Resource that has been <see cref="Load{T}">loaded</see> without initialization. You shouldn't need this method in almost all cases.
 /// Only use it when you know exactly what you're doing. Consider requesting the Resource from the <see cref="ContentProvider"/> instead.
 /// </summary>
 /// <param name="res">The Resource to initialize.</param>
 public static void Init(Resource res)
 {
     if (res.initState != InitState.Initializing)
     {
         return;
     }
     res.OnLoaded();
     res.initState = InitState.Initialized;
 }
Exemple #2
0
 /// <summary>
 /// Initializes a Resource that has been <see cref="Load{T}">loaded</see> without initialization. You shouldn't need this method in almost all cases.
 /// Only use it when you know exactly what you're doing. Consider requesting the Resource from the <see cref="ContentProvider"/> instead.
 /// </summary>
 /// <param name="res">The Resource to initialize.</param>
 public static void Init(Resource res)
 {
     if (res.initState != InitState.Initializing)
     {
         return;
     }
     res.OnLoaded();
     if (ResourceLoaded != null)
     {
         ResourceLoaded(res, new ResourceEventArgs(res));
     }
     res.initState = InitState.Initialized;
 }