mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
1、Scene.Create接口增加了一个泛型方法接口。 2、SceneConfig增加了SceneTypeConfig和SceneSubType
1、Scene.Create接口增加了一个泛型方法接口。 2、SceneConfig增加了SceneTypeConfig和SceneSubType
This commit is contained in:
@@ -3,9 +3,11 @@ namespace TEngine
|
||||
public class SceneConfigInfo
|
||||
{
|
||||
public uint Id;
|
||||
public string Name;
|
||||
public long EntityId;
|
||||
public string SceneType;
|
||||
public int SceneType;
|
||||
public int SceneSubType;
|
||||
public string SceneTypeStr;
|
||||
public string SceneSubTypeStr;
|
||||
public uint ServerConfigId;
|
||||
public uint WorldId;
|
||||
public int OuterPort;
|
||||
|
@@ -140,7 +140,7 @@ namespace TEngine
|
||||
Id = serverConfigId
|
||||
};
|
||||
|
||||
server.Scene = await Scene.Create(server,null,$"ServerScene{serverConfigId}");
|
||||
server.Scene = await Scene.Create(server);
|
||||
|
||||
// 创建网络、Server下的网络只能是内部网络、外部网络是在Scene中定义
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace TEngine
|
||||
|
||||
foreach (var sceneConfig in sceneInfos)
|
||||
{
|
||||
await Scene.Create(server, sceneConfig.SceneType, sceneConfig.Name, sceneConfig.EntityId,
|
||||
await Scene.Create(server, sceneConfig.SceneType, sceneConfig.SceneSubType, sceneConfig.EntityId,
|
||||
sceneConfig.WorldId, sceneConfig.NetworkProtocol, outerBindIp, sceneConfig.OuterPort);
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ namespace TEngine.Core.Network
|
||||
|
||||
foreach (var sceneConfigInfo in sceneConfigInfos)
|
||||
{
|
||||
if (sceneConfigInfo.SceneType == "Addressable")
|
||||
if (sceneConfigInfo.SceneTypeStr == "Addressable")
|
||||
{
|
||||
AddressableScenes.Add(sceneConfigInfo);
|
||||
}
|
||||
|
Reference in New Issue
Block a user