feat: initial commit - HJHA game server full source
6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) + game logic (GameFix/GameDAL/ServerData) + network layer (NetWorkMessage) + data layer (ObjectModel) + utilities (MrWu/Core/Config/CloudAPI/dll) + adapters (zyxAdapter/base) .NET 8.0 C# solution, 16 projects, 958 source files
This commit is contained in:
65
ServerCore/Actor/Base/IActor.cs
Normal file
65
ServerCore/Actor/Base/IActor.cs
Normal file
@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using NetWorkMessage;
|
||||
using Server.Core;
|
||||
|
||||
namespace ActorCore
|
||||
{
|
||||
/// <summary>
|
||||
/// IActor
|
||||
/// </summary>
|
||||
public interface IActor : IDisposable
|
||||
{
|
||||
ActorId ActorId
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否被Manager管理
|
||||
/// </summary>
|
||||
bool IsRegister
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
bool IsDisposed
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
SchedulerType SchedulerType
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 由ActorManager管理,其他地方不可以设置
|
||||
/// </summary>
|
||||
int Id
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 线程同步上下文
|
||||
/// </summary>
|
||||
ThreadSynchronizationContext ThreadSynchronizationContext
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
void RegisterHandle();
|
||||
|
||||
void IUpdate();
|
||||
|
||||
void ILateUpdate();
|
||||
|
||||
/// <summary>
|
||||
/// 发送消息
|
||||
/// </summary>
|
||||
/// <param name="actorId"></param>
|
||||
/// <param name="message"></param>
|
||||
void Send(ActorId actorId, IMessage message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user