mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -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)
|
||||
|
@@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
3
JNFrame/Assets/Game/Plugins/App/Util.meta
Normal file
3
JNFrame/Assets/Game/Plugins/App/Util.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ede0c35f3d54e828355e4f165c228ac
|
||||
timeCreated: 1706842217
|
18
JNFrame/Assets/Game/Plugins/App/Util/JNRandom.cs
Normal file
18
JNFrame/Assets/Game/Plugins/App/Util/JNRandom.cs
Normal 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);
|
||||
|
||||
}
|
||||
}
|
3
JNFrame/Assets/Game/Plugins/App/Util/JNRandom.cs.meta
Normal file
3
JNFrame/Assets/Game/Plugins/App/Util/JNRandom.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db0a4b2b86334e07a21aa0911a349612
|
||||
timeCreated: 1706842240
|
Reference in New Issue
Block a user