mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交无缝数据回滚
This commit is contained in:
@@ -20,6 +20,7 @@ namespace AppGame
|
||||
|
||||
//获取ID
|
||||
public UniTask<NewsContext<int>> NSyncTileId = App.API.GetNews<int>($"/sync/tile/id");
|
||||
public UniTask<NewsContext<int>> NSyncTileRandomId = App.API.GetNews<int>($"/sync/tile/random/id");
|
||||
//获取端口
|
||||
public UniTask<NewsContext<int>> NSyncTilePort = App.API.GetNews<int>($"/sync/tile/port");
|
||||
//获取默认连接
|
||||
|
@@ -49,6 +49,8 @@ namespace AppGame.Sync
|
||||
protected override async Task OnInit()
|
||||
{
|
||||
|
||||
RandomSize = (await App.GAPI.NSyncTileRandomId).data;
|
||||
|
||||
await base.OnInit();
|
||||
|
||||
if (isRecover)
|
||||
@@ -67,7 +69,7 @@ namespace AppGame.Sync
|
||||
{
|
||||
Debug.Log("[JNGTileServerSystem] 获取到恢复数据成功 正在恢复数据");
|
||||
|
||||
var message = new Dictionary<long, byte[]>();
|
||||
var message = new Dictionary<ulong, byte[]>();
|
||||
tileInfo.Data.Data.ForEach(frame =>
|
||||
{
|
||||
message.Clear();
|
||||
|
@@ -115,7 +115,7 @@ namespace AppGame.Systems
|
||||
/// </summary>
|
||||
public void AddState(JNStateItemData frame)
|
||||
{
|
||||
var message = new Dictionary<long, byte[]>();
|
||||
var message = new Dictionary<ulong, byte[]>();
|
||||
foreach (var data in frame.Messages)
|
||||
{
|
||||
message.Add(data.Key,data.Value.Data.ToByteArray());
|
||||
|
Reference in New Issue
Block a user