This commit is contained in:
PC-20230316NUNE\Administrator
2024-02-02 15:38:13 +08:00
parent 877dca3b43
commit 00f56e11c7
228 changed files with 36944 additions and 20084 deletions

View File

@@ -1,4 +1,5 @@
using Cysharp.Threading.Tasks;
using Plugins.JNGame.Network.Action;
using Plugins.JNGame.Sync.Frame;
using UnityEngine;
@@ -8,7 +9,8 @@ namespace Game.Plugins.App
{
protected override void OnSendInput(JNFrameInputs inputs)
{
throw new System.NotImplementedException();
//发送帧数据给服务端
App.Socket.Send((int)NActionEnum.NSyncFrameInput,inputs);
}
protected override async UniTask<JNFrameInfos> OnServerData(int start, int end)

View File

@@ -11,6 +11,14 @@ namespace Game.Plugins.App.Sync
}
public override void OnSyncLoad(){}
public override void OnSyncUpdate(int dt, JNFrameInfo frame, T input)
{
}
public override void OnLateSyncUpdate(int dt, JNFrameInfo frame, T input)
{
}
}
}

View File

@@ -4,8 +4,12 @@ namespace Game.Plugins.App.Sync
{
public class JNGSyncFrameDefault : JNGSyncFrame<Object>
{
public override void OnSyncUpdate(int dt, JNFrameInfo frame, Object input)
{
}
public override void OnLateSyncUpdate(int dt, JNFrameInfo frame, Object input)
{
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5ede0c35f3d54e828355e4f165c228ac
timeCreated: 1706842217

View File

@@ -0,0 +1,18 @@
using UnityEngine;
namespace Game.Plugins.App.Util
{
//临时的随机数 因为帧同步不允许随机数 所以临时用固定值代替
public class JNRandom
{
public static float value => 0.5f;
public static float Range(float min,float max)
{
return min + ((max - min) / 2);
}
public static Vector3 onUnitSphere => new Vector3(-0.577844f, 0.327635f, 0.177893f);
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: db0a4b2b86334e07a21aa0911a349612
timeCreated: 1706842240