| | | 1 | | using Lattice.Math; |
| | | 2 | | |
| | | 3 | | namespace Lattice.ECS.Session |
| | | 4 | | { |
| | | 5 | | /// <summary> |
| | | 6 | | /// 纯 C#、单线程、固定顺序、可回滚的最小预测运行时。 |
| | | 7 | | /// 这是当前主干正式承诺的 Session 运行模式。 |
| | | 8 | | /// </summary> |
| | | 9 | | public class MinimalPredictionSession : SessionRuntime |
| | | 10 | | { |
| | 1 | 11 | | private static readonly SessionRuntimeBoundary MinimalPredictionBoundary = new( |
| | 1 | 12 | | SessionRuntimeKind.MinimalPrediction, |
| | 1 | 13 | | SessionRuntimeCapability.LocalPredictionStep | |
| | 1 | 14 | | SessionRuntimeCapability.PredictionVerification | |
| | 1 | 15 | | SessionRuntimeCapability.LocalRewind | |
| | 1 | 16 | | SessionRuntimeCapability.CheckpointRestore, |
| | 1 | 17 | | UnsupportedSessionRuntimeCapability.ThreadedScheduling | |
| | 1 | 18 | | UnsupportedSessionRuntimeCapability.ResourceConfiguredBoot | |
| | 1 | 19 | | UnsupportedSessionRuntimeCapability.FullNetworkSession | |
| | 1 | 20 | | UnsupportedSessionRuntimeCapability.PlayerMappingAndTransport); |
| | | 21 | | |
| | | 22 | | public MinimalPredictionSession(FP deltaTime, int localPlayerId = 0) |
| | 84 | 23 | | : base(deltaTime, localPlayerId) |
| | | 24 | | { |
| | 84 | 25 | | } |
| | | 26 | | |
| | | 27 | | public MinimalPredictionSession(SessionRuntimeOptions runtimeOptions) |
| | 23 | 28 | | : base(runtimeOptions) |
| | | 29 | | { |
| | 23 | 30 | | } |
| | | 31 | | |
| | | 32 | | /// <summary> |
| | | 33 | | /// 当前模式的正式运行边界。 |
| | | 34 | | /// </summary> |
| | 610 | 35 | | public override SessionRuntimeBoundary RuntimeBoundary => MinimalPredictionBoundary; |
| | | 36 | | } |
| | | 37 | | } |