Init TEngine4.0.0

Init TEngine4.0.0
This commit is contained in:
ALEXTANG
2023-10-08 15:47:33 +08:00
parent 8c3d6308b9
commit 20d0ecd8da
51 changed files with 125 additions and 15943 deletions

View File

@@ -1,16 +0,0 @@
namespace GameBase
{
public class BaseClsTemplate<T>
{
protected static T Imp;
/// <summary>
/// Unity工程注册处理函数。
/// </summary>
/// <param name="imp">实现类。</param>
public static void RegisterImp(T imp)
{
Imp = imp;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: bb7ef2f42b33ada47b3543dc7723fcb5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,29 +0,0 @@
using System;
namespace TEngine
{
[AttributeUsage(AttributeTargets.Class)]
public class UpdateAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class)]
public class FixedUpdateAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class)]
public class LateUpdateAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class)]
public class RoleLoginAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class)]
public class RoleLogoutAttribute : Attribute
{
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 80791cccf63d44faa348884ea0c506a2
timeCreated: 1684553027

View File

@@ -34,6 +34,47 @@ namespace TEngine
}
}
#region Attribute
/// <summary>
/// 帧更新属性。
/// <remarks>适用于BehaviourSingleton。</remarks>
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class UpdateAttribute : Attribute
{
}
/// <summary>
/// 物理帧更新属性。
/// <remarks>适用于BehaviourSingleton。</remarks>
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class FixedUpdateAttribute : Attribute
{
}
/// <summary>
/// 后帧更新属性。
/// <remarks>适用于BehaviourSingleton。</remarks>
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class LateUpdateAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class)]
public class RoleLoginAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class)]
public class RoleLogoutAttribute : Attribute
{
}
#endregion
/// <summary>
/// 基础Behaviour单例。
/// <remarks>(抽象类)</remarks>
@@ -97,7 +138,7 @@ namespace TEngine
/// <summary>
/// 通过LogicSys来驱动且具备Unity完整生命周期的驱动系统不继承MonoBehaviour
/// </summary>
public class BehaviourSingleSystem : BaseLogicSys<BehaviourSingleSystem>
public sealed class BehaviourSingleSystem : BaseLogicSys<BehaviourSingleSystem>
{
private readonly List<BaseBehaviourSingleton> _listInst = new List<BaseBehaviourSingleton>();
private readonly List<BaseBehaviourSingleton> _listStart = new List<BaseBehaviourSingleton>();
@@ -262,7 +303,6 @@ namespace TEngine
private bool HadAttribute<T>(Type type) where T : Attribute
{
T attribute = Attribute.GetCustomAttribute(type, typeof(T)) as T;
return attribute != null;
}
}

View File

@@ -3,7 +3,7 @@
namespace GameBase
{
/// <summary>
/// 用来在多线程下检测耗时。
/// 用检测耗时。
/// </summary>
public class GameTickWatcher
{

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: b062b3e32edd4536a4308a3d180842e0
timeCreated: 1681989133