[+] 接入ET8服务端

[+] 接入ET8服务端
This commit is contained in:
ALEXTANG
2023-07-13 12:23:48 +08:00
parent e0be062006
commit 336d4b2eb9
1316 changed files with 130657 additions and 626 deletions

View File

@@ -0,0 +1,16 @@
using System.IO;
namespace ET.Server
{
// 知道对方的Id使用这个类发actor消息
[ChildOf(typeof(ActorLocationSenderOneType))]
public class ActorLocationSender: Entity, IAwake, IDestroy
{
public ActorId ActorId;
// 最近接收或者发送消息的时间
public long LastSendOrRecvTime;
public int Error;
}
}

View File

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

View File

@@ -0,0 +1,26 @@
using System.Collections.Generic;
namespace ET.Server
{
[ChildOf(typeof(ActorLocationSenderComponent))]
public class ActorLocationSenderOneType: Entity, IAwake<int>, IDestroy
{
public const long TIMEOUT_TIME = 60 * 1000;
public long CheckTimer;
public int LocationType;
}
[ComponentOf(typeof(Scene))]
public class ActorLocationSenderComponent: Entity, IAwake
{
public const long TIMEOUT_TIME = 60 * 1000;
public long CheckTimer;
public ActorLocationSenderOneType[] ActorLocationSenderComponents = new ActorLocationSenderOneType[LocationType.Max];
}
}

View File

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

View File

@@ -0,0 +1,43 @@
using System.Collections.Generic;
namespace ET.Server
{
[UniqueId(0, 100)]
public static class LocationType
{
public const int Unit = 0;
public const int Player = 1;
public const int Friend = 2;
public const int Chat = 3;
public const int GateSession = 4;
public const int Max = 100;
}
[ChildOf(typeof(LocationOneType))]
public class LockInfo: Entity, IAwake<ActorId, CoroutineLock>, IDestroy
{
public ActorId LockActorId;
public CoroutineLock CoroutineLock
{
get;
set;
}
}
[ChildOf(typeof(LocationManagerComoponent))]
public class LocationOneType: Entity, IAwake<int>
{
public int LocationType;
public readonly Dictionary<long, ActorId> locations = new();
public readonly Dictionary<long, LockInfo> lockInfos = new();
}
[ComponentOf(typeof(Scene))]
public class LocationManagerComoponent: Entity, IAwake
{
public LocationOneType[] LocationOneTypes = new LocationOneType[LocationType.Max];
}
}

View File

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

View File

@@ -0,0 +1,9 @@
using System;
namespace ET.Server
{
[ComponentOf(typeof(Scene))]
public class LocationProxyComponent: Entity, IAwake
{
}
}

View File

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