| | | 1 | | using Lattice.Math; |
| | | 2 | | |
| | | 3 | | namespace Lattice.ECS.Session |
| | | 4 | | { |
| | | 5 | | /// <summary> |
| | | 6 | | /// 纯 C#、单线程、固定顺序的本地权威运行时。 |
| | | 7 | | /// 该模式用于承载只前推的本地 authoritative 模拟链路: |
| | | 8 | | /// 保留固定帧推进与显式 checkpoint,但不支持预测验证与 rewind。 |
| | | 9 | | /// </summary> |
| | | 10 | | public sealed class LocalAuthoritativeSession : SessionRuntime |
| | | 11 | | { |
| | 1 | 12 | | private static readonly SessionRuntimeBoundary LocalAuthoritativeBoundary = new( |
| | 1 | 13 | | SessionRuntimeKind.LocalAuthoritative, |
| | 1 | 14 | | SessionRuntimeCapability.LocalPredictionStep | |
| | 1 | 15 | | SessionRuntimeCapability.CheckpointRestore, |
| | 1 | 16 | | UnsupportedSessionRuntimeCapability.ThreadedScheduling | |
| | 1 | 17 | | UnsupportedSessionRuntimeCapability.ResourceConfiguredBoot | |
| | 1 | 18 | | UnsupportedSessionRuntimeCapability.FullNetworkSession | |
| | 1 | 19 | | UnsupportedSessionRuntimeCapability.PlayerMappingAndTransport); |
| | | 20 | | |
| | | 21 | | public LocalAuthoritativeSession(FP deltaTime, int localPlayerId = 0) |
| | 2 | 22 | | : base(deltaTime, localPlayerId) |
| | | 23 | | { |
| | 2 | 24 | | } |
| | | 25 | | |
| | | 26 | | public LocalAuthoritativeSession(SessionRuntimeOptions runtimeOptions) |
| | 3 | 27 | | : base(runtimeOptions) |
| | | 28 | | { |
| | 3 | 29 | | } |
| | | 30 | | |
| | | 31 | | /// <summary> |
| | | 32 | | /// 当前模式的正式运行边界。 |
| | | 33 | | /// </summary> |
| | 17 | 34 | | public override SessionRuntimeBoundary RuntimeBoundary => LocalAuthoritativeBoundary; |
| | | 35 | | } |
| | | 36 | | } |