mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] Module
[+] Module
This commit is contained in:
13
Assets/TEngine/Runtime/Module.cs
Normal file
13
Assets/TEngine/Runtime/Module.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
namespace TEngine
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 模块化基础组件。
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T">游戏框架模块抽象类。</typeparam>
|
||||||
|
public abstract class Module<T> where T : GameFrameworkModuleBase
|
||||||
|
{
|
||||||
|
private static T _instance;
|
||||||
|
|
||||||
|
public static T Instance => _instance ??= GameModule.Get<T>();
|
||||||
|
}
|
||||||
|
}
|
3
Assets/TEngine/Runtime/Module.cs.meta
Normal file
3
Assets/TEngine/Runtime/Module.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ca5335769163409baf13a0d5e3596dd2
|
||||||
|
timeCreated: 1681367938
|
Reference in New Issue
Block a user