mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] Add GamePlayScene
[+] Add GamePlayScene
This commit is contained in:
@@ -7,6 +7,7 @@ namespace TEngine
|
||||
public const int Addressable = 2;
|
||||
public const int Map = 3;
|
||||
public const int Chat = 4;
|
||||
public const int Gameplay = 5;
|
||||
|
||||
public static readonly Dictionary<string, int> SceneDic = new Dictionary<string, int>()
|
||||
{
|
||||
@@ -14,6 +15,7 @@ namespace TEngine
|
||||
{ "Addressable", 2 },
|
||||
{ "Map", 3 },
|
||||
{ "Chat", 4 },
|
||||
{ "Gameplay", 5 },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@@ -6,11 +6,37 @@ namespace TEngine.Logic;
|
||||
[Flags]
|
||||
public enum SceneType: long
|
||||
{
|
||||
/// <summary>
|
||||
/// 场景无。
|
||||
/// </summary>
|
||||
None = 0,
|
||||
Gate = 1, // Gate
|
||||
Addressable = 1 << 2, // 负责进程间消息通信
|
||||
Map = 1 << 3, // 游戏场景服
|
||||
Chat = 1 << 4, // 游戏聊天服
|
||||
|
||||
/// <summary>
|
||||
/// 场景Gate。
|
||||
/// </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>
|
||||
@@ -39,6 +65,8 @@ public class OnCreateScene : AsyncEventSystem<TEngine.OnCreateScene>
|
||||
sceneConfigInfo.Scene.AddComponent<AccountComponent>();
|
||||
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}");
|
||||
|
||||
|
Reference in New Issue
Block a user