mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 19:34:47 +00:00
27 lines
717 B
C#
27 lines
717 B
C#
using Cysharp.Threading.Tasks;
|
|
using Plugins.JNGame.Sync.Frame;
|
|
using UnityEngine;
|
|
|
|
namespace Script.AppImpl
|
|
{
|
|
public class JNGSyncFrame : JNSyncFrame
|
|
{
|
|
protected override void OnSendInput(JNFrameInputs inputs)
|
|
{
|
|
throw new System.NotImplementedException();
|
|
}
|
|
|
|
protected override async UniTask<JNFrameInfos> OnServerData(int start, int end)
|
|
{
|
|
var data = (await App.Api.GetByte($"/sync/frame?start={start}"));
|
|
if (data is { Length: > 0 })
|
|
{
|
|
return JNFrameInfos.Parser.ParseFrom(data);
|
|
}
|
|
else
|
|
{
|
|
return new JNFrameInfos();
|
|
}
|
|
}
|
|
}
|
|
} |