mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
[+] Add GamePlayScene
[+] Add GamePlayScene
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
|||||||
{"MachineConfig":1688402650290,"SceneConfig":1688638278438,"WorldConfig":1688296851256,"ServerConfig":1688401154525}
|
{"MachineConfig":1689596609276,"SceneConfig":1689619864417,"ServerConfig":1689620185714,"WorldConfig":1689267887552}
|
@@ -1,10 +1,7 @@
|
|||||||
{"List":[
|
{"List":[
|
||||||
{"Id":1,"EntityId":17246978048,"RouteId":1024,"WorldId":1,"SceneType":"Gate","Name":"Gate","NetworkProtocol":"KCP","OuterPort":20000},
|
{"Id":1,"EntityId":17246978048,"RouteId":1024,"WorldId":0,"SceneType":"Gate","Name":"Gate","NetworkProtocol":"KCP","OuterPort":20000},
|
||||||
{"Id":2,"EntityId":34493956096,"RouteId":2048,"WorldId":1,"SceneType":"Addressable","Name":"Addressable1","NetworkProtocol":null,"OuterPort":0},
|
{"Id":2,"EntityId":34493956096,"RouteId":2048,"WorldId":0,"SceneType":"Addressable","Name":"Addressable1","NetworkProtocol":null,"OuterPort":0},
|
||||||
{"Id":4,"EntityId":68920803328,"RouteId":3072,"WorldId":1,"SceneType":"Map","Name":"Map1","NetworkProtocol":null,"OuterPort":0},
|
{"Id":4,"EntityId":68920803328,"RouteId":3072,"WorldId":0,"SceneType":"Map","Name":"Map1","NetworkProtocol":null,"OuterPort":0},
|
||||||
{"Id":5,"EntityId":86167781376,"RouteId":4096,"WorldId":1,"SceneType":"Chat","Name":"Chat","NetworkProtocol":null,"OuterPort":0},
|
{"Id":5,"EntityId":86167781376,"RouteId":4096,"WorldId":0,"SceneType":"Chat","Name":"Chat1","NetworkProtocol":null,"OuterPort":0},
|
||||||
{"Id":6,"EntityId":103146389504,"RouteId":1025,"WorldId":1,"SceneType":"Gate","Name":"Gate","NetworkProtocol":"KCP","OuterPort":20000},
|
{"Id":6,"EntityId":103414759424,"RouteId":5120,"WorldId":0,"SceneType":"Gameplay","Name":"Gameplay1","NetworkProtocol":null,"OuterPort":0}
|
||||||
{"Id":7,"EntityId":120393367552,"RouteId":2049,"WorldId":1,"SceneType":"Addressable","Name":"Addressable1","NetworkProtocol":null,"OuterPort":0},
|
|
||||||
{"Id":8,"EntityId":137640345600,"RouteId":3073,"WorldId":1,"SceneType":"Map","Name":"Map1","NetworkProtocol":null,"OuterPort":0},
|
|
||||||
{"Id":9,"EntityId":154887323648,"RouteId":4097,"WorldId":1,"SceneType":"Chat","Name":"Chat","NetworkProtocol":null,"OuterPort":0}
|
|
||||||
]}
|
]}
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
{"List":[
|
{"List":[
|
||||||
{"Id":1025,"MachineId":1,"InnerPort":11001,"ReleaseMode":false},
|
{"Id":1024,"MachineId":1,"InnerPort":11001,"ReleaseMode":false},
|
||||||
{"Id":2049,"MachineId":1,"InnerPort":11002,"ReleaseMode":false},
|
{"Id":2048,"MachineId":1,"InnerPort":11002,"ReleaseMode":false},
|
||||||
{"Id":3073,"MachineId":1,"InnerPort":11003,"ReleaseMode":false},
|
{"Id":3072,"MachineId":1,"InnerPort":11003,"ReleaseMode":false},
|
||||||
{"Id":4097,"MachineId":1,"InnerPort":11004,"ReleaseMode":false}
|
{"Id":4096,"MachineId":1,"InnerPort":11004,"ReleaseMode":false},
|
||||||
|
{"Id":5120,"MachineId":1,"InnerPort":11005,"ReleaseMode":false}
|
||||||
]}
|
]}
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
{"List":[
|
{"List":[
|
||||||
{"Id":1,"WorldName":"测试服","DbConnection":"mongodb://1.12.241.46:27017/","DbName":"tengine_test","DbType":"MongoDB","IsGameWorld":true}
|
{"Id":1,"WorldName":"测试服","DbConnection":"mongodb://root:root@127.0.0.1","DbName":"tengine_main","DbType":"MongoDB","IsGameWorld":true}
|
||||||
]}
|
]}
|
||||||
|
@@ -7,6 +7,7 @@ namespace TEngine
|
|||||||
public const int Addressable = 2;
|
public const int Addressable = 2;
|
||||||
public const int Map = 3;
|
public const int Map = 3;
|
||||||
public const int Chat = 4;
|
public const int Chat = 4;
|
||||||
|
public const int Gameplay = 5;
|
||||||
|
|
||||||
public static readonly Dictionary<string, int> SceneDic = new Dictionary<string, int>()
|
public static readonly Dictionary<string, int> SceneDic = new Dictionary<string, int>()
|
||||||
{
|
{
|
||||||
@@ -14,6 +15,7 @@ namespace TEngine
|
|||||||
{ "Addressable", 2 },
|
{ "Addressable", 2 },
|
||||||
{ "Map", 3 },
|
{ "Map", 3 },
|
||||||
{ "Chat", 4 },
|
{ "Chat", 4 },
|
||||||
|
{ "Gameplay", 5 },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -6,11 +6,37 @@ namespace TEngine.Logic;
|
|||||||
[Flags]
|
[Flags]
|
||||||
public enum SceneType: long
|
public enum SceneType: long
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 场景无。
|
||||||
|
/// </summary>
|
||||||
None = 0,
|
None = 0,
|
||||||
Gate = 1, // Gate
|
|
||||||
Addressable = 1 << 2, // 负责进程间消息通信
|
/// <summary>
|
||||||
Map = 1 << 3, // 游戏场景服
|
/// 场景Gate。
|
||||||
Chat = 1 << 4, // 游戏聊天服
|
/// </summary>
|
||||||
|
Gate = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 场景Addressable。
|
||||||
|
/// <remarks>负责进程间消息通信。</remarks>
|
||||||
|
/// </summary>
|
||||||
|
Addressable = 1 << 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 场景GamePlay
|
||||||
|
/// <remarks>游戏玩法服。</remarks>
|
||||||
|
/// </summary>
|
||||||
|
Gameplay = 1 << 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 游戏场景服。
|
||||||
|
/// </summary>
|
||||||
|
Map = 1 << 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 游戏聊天服。
|
||||||
|
/// </summary>
|
||||||
|
Chat = 1 << 5,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -39,6 +65,8 @@ public class OnCreateScene : AsyncEventSystem<TEngine.OnCreateScene>
|
|||||||
sceneConfigInfo.Scene.AddComponent<AccountComponent>();
|
sceneConfigInfo.Scene.AddComponent<AccountComponent>();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SceneType.Gameplay:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
Log.Info($"scene create: {self.SceneInfo.SceneType} {self.SceneInfo.Name} SceneId:{self.SceneInfo.Id} ServerId:{self.SceneInfo.RouteId} WorldId:{self.SceneInfo.WorldId}");
|
Log.Info($"scene create: {self.SceneInfo.SceneType} {self.SceneInfo.Name} SceneId:{self.SceneInfo.Id} ServerId:{self.SceneInfo.RouteId} WorldId:{self.SceneInfo.WorldId}");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user