mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 10:46:17 +00:00
基础案例 准备改帧同步了
This commit is contained in:
@@ -4,8 +4,11 @@ using UnityEngine;
|
||||
|
||||
namespace JNGame.Sync.System.Data.Type
|
||||
{
|
||||
/// <summary>
|
||||
/// 用于传输的 LVector3 类型
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DValuePosition
|
||||
public class NDataLVector3
|
||||
{
|
||||
public long x;
|
||||
public long y;
|
||||
@@ -23,7 +26,7 @@ namespace JNGame.Sync.System.Data.Type
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is not DValuePosition old) return false;
|
||||
if (obj is not NDataLVector3 old) return false;
|
||||
return old.x == x && old.y == y && old.z == z;
|
||||
}
|
||||
|
||||
@@ -32,9 +35,9 @@ namespace JNGame.Sync.System.Data.Type
|
||||
return new LVector3(new LFloat(true,x), new LFloat(true,y), new LFloat(true,z));
|
||||
}
|
||||
|
||||
public static DValuePosition Build(LVector3 vec3)
|
||||
public static NDataLVector3 Build(LVector3 vec3)
|
||||
{
|
||||
return new DValuePosition()
|
||||
return new NDataLVector3()
|
||||
{
|
||||
x = vec3.x.rawValue,
|
||||
y = vec3.y.rawValue,
|
@@ -1,5 +1,6 @@
|
||||
using GAS.Runtime;
|
||||
using JNGame.Sync.System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace JNGame.Runtime.Sync.System.Logic
|
||||
{
|
||||
@@ -14,10 +15,10 @@ namespace JNGame.Runtime.Sync.System.Logic
|
||||
/// </summary>
|
||||
private JexGasManager _gas = new();
|
||||
public JexGasManager GAS => _gas;
|
||||
|
||||
|
||||
public override void OnSyncUpdate(int dt)
|
||||
{
|
||||
GAS.Update();
|
||||
GAS.Update(dt);
|
||||
}
|
||||
|
||||
public void Register(AbilitySystemComponent abilitySystemComponent)
|
||||
|
Reference in New Issue
Block a user