You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// An <see cref="Entity"/> can be associated with a tag for identification. However, an <see cref="Entity"/> also has a unique identifier - see <see cref="Entity.UniqueIdentifier"/>.
Copy file name to clipboardexpand all lines: FinalEngine.ECS/IEntityFactory.cs
+14
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,21 @@
4
4
5
5
namespaceFinalEngine.ECS;
6
6
7
+
/// <summary>
8
+
/// Defines an interface that provides a method to create an <see cref="Entity"/>.
9
+
/// </summary>
10
+
///
11
+
/// <remarks>
12
+
/// You should implement this interface in a scenario where an <see cref="Entity"/> must be created and assigned a default collection of components and can be reused. It simply provides a means to simplify the relationship between entities and components.
/// Represents an exception that is thrown when a <see cref="ResourceLoaderBase{TResource}"/> has not been registered to an <see cref="IResourceManager"/>.
11
+
/// </summary>
12
+
///
13
+
/// <remarks>
14
+
/// To register a <see cref="ResourceLoaderBase{TResource}"/> to an <see cref="IResourceManager"/> you should invoke the <see cref="IResourceManager.RegisterLoader{T}(ResourceLoaderBase{T})"/> function.
Copy file name to clipboardexpand all lines: FinalEngine.Resources/IResourceManager.cs
+51-1
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,64 @@
5
5
namespaceFinalEngine.Resources;
6
6
7
7
usingSystem;
8
+
usingFinalEngine.Resources.Exceptions;
8
9
10
+
/// <summary>
11
+
/// Defines an interface that represents a resource manager.
12
+
/// </summary>
13
+
///
14
+
/// <remarks>
15
+
/// In almost all scenarios you should never have to implement this interface; if you require management of resources you should use the standard <see cref="ResourceManager"/> implementation.
16
+
/// </remarks>
17
+
///
18
+
/// <seealso cref="System.IDisposable" />
9
19
publicinterfaceIResourceManager:IDisposable
10
20
{
21
+
/// <summary>
22
+
/// Loads a resource at the specified <paramref name="filePath"/>.
23
+
/// </summary>
24
+
/// <typeparam name="T">
25
+
/// The type of resource to load.
26
+
/// </typeparam>
27
+
///
28
+
/// <param name="filePath">
29
+
/// The file path of the resource to load.
30
+
/// </param>
31
+
///
32
+
/// <remarks>
33
+
/// The typical implementation of <see cref="IResourceManager"/> should attempt to cache resources; this way if <see cref="LoadResource{T}(string)"/> is called for the same file a reference the already loaded resource can be fetched.
34
+
/// </remarks>
35
+
///
36
+
/// <returns>
37
+
/// The loaded resource, of type <typeparamref name="T"/>.
38
+
/// </returns>
11
39
TLoadResource<T>(stringfilePath)
12
40
whereT:IResource;
13
41
42
+
/// <summary>
43
+
/// Registers the specified <paramref name="loader"/> to this <see cref="IResourceManager"/>.
44
+
/// </summary>
45
+
///
46
+
/// <typeparam name="T">
47
+
/// The type of resource that can be loaded.
48
+
/// </typeparam>
49
+
///
50
+
/// <param name="loader">
51
+
/// The resource loader to be used when attempting to resolve a resource of type <typeparamref name="T"/>.
52
+
/// </param>
53
+
///
54
+
/// <remarks>
55
+
/// The typical implementation of an <see cref="IResourceManager"/> should likely throw a <see cref="ResourceLoaderNotRegisteredException"/> if a loader of the specified <typeparamref name="T"/> type has already been registered.
/// Unloads the specified <paramref name="resource"/> from this <see cref="IResourceManager"/> (calling it's dispose method if <see cref="IDisposable"/> is implemented and there are no references).
0 commit comments