33 lines
750 B
C#
Raw Normal View History

2024-08-17 14:27:18 +08:00
using JNGame.Sync.Frame.Service;
using NotImplementedException = System.NotImplementedException;
namespace JNGame.Sync.System
{
/// <summary>
/// 帧同步 - 逻辑系统
/// </summary>
public class SLogicSystem : SBaseSystem,IJNSyncCycle,IJNSyncId
{
2024-08-23 10:48:19 +08:00
private ulong _id;
public ulong Id => _id;
2024-08-17 14:27:18 +08:00
public virtual void OnSyncStart()
{
JNRandomSystem random;
if (this is JNRandomSystem) random = (JNRandomSystem)this;
else random = GetSystem<JNRandomSystem>();
_id = random.NextId();
}
2024-08-31 21:05:29 +08:00
public virtual void OnSyncUpdate(int dt)
2024-08-17 14:27:18 +08:00
{
}
2024-09-12 18:06:22 +08:00
public virtual void OnSyncDestroy(){}
2024-08-17 14:27:18 +08:00
}
}