This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2024-10-24 02:21:21 +08:00
parent 0827295804
commit 6cf78b53bb
61 changed files with 9651 additions and 12551 deletions

View File

@@ -26,7 +26,7 @@ namespace JNGame.GAS
if (frame >= startFrame && frame <= endFrame)
{
preview.transform.position = Vector3.Lerp(start.ToVector3(), end.ToVector3(), (float)(frame - startFrame) / endFrame);
preview.transform.position = Vector3.Lerp(start.ToVector3(), end.ToVector3(), (float)(frame - startFrame) / (endFrame - startFrame));
}
}
@@ -34,7 +34,7 @@ namespace JNGame.GAS
public override void OnStart(int startFrame)
{
Debug.Log("OnEnd");
Debug.Log("OnStart");
}
public override void OnEnd(int endFrame)
@@ -45,7 +45,7 @@ namespace JNGame.GAS
public override void OnTick(int frameIndex, int startFrame, int endFrame)
{
Debug.Log($"OnTick {frameIndex} {startFrame} {endFrame}");
((GAbilitySystemComponent)m_Spec.Owner).Entity.Transform.Position = LVector3.Lerp(start, end, (LFloat)(frameIndex - startFrame) / endFrame);
((GAbilitySystemComponent)m_Spec.Owner).Entity.Transform.Position = LVector3.Lerp(start, end, (LFloat)(frameIndex - startFrame) / (endFrame - startFrame));
}
}
}

View File

@@ -0,0 +1,17 @@
using JNGame.Sync.System.Data;
using NotImplementedException = System.NotImplementedException;
namespace GASSamples.Scripts.Game.Logic.Data
{
public class GEventDataSystem : SEventDataSystem
{
public GEventDataSystem(SEventDataEnum type) : base(type)
{
}
public override void OnSendUBytes(byte[] bytes)
{
OnInsertUBytes(bytes);
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 62c8d2be3a26419791fb6456f47f82a2
timeCreated: 1729707100

View File

@@ -11,7 +11,7 @@ namespace GASSamples.Scripts.Game.GAS
public IJNEntity Entity { get; protected set; }
public GAbilitySystemComponent(IJNEntity entity)
{
Entity = entity;
@@ -48,22 +48,6 @@ namespace GASSamples.Scripts.Game.GAS
Debug.Log("OnGERelease");
}
public override int OnCueAdd(AbilitySpec abilitySpec, string cueAssetLocation)
{
Debug.Log("OnCueAdd");
return 0;
}
public override void OnCueRemove(AbilitySpec abilitySpec, int cueClipIndex)
{
Debug.Log("OnCueRemove");
}
public override void OnCueExecute(AbilitySpec abilitySpec, string[] cueAssetLocations)
{
Debug.Log("OnCueExecute");
}
public override void OnAbilityEnd(AbilitySpec abilitySpec)
{
Debug.Log("OnAbilityEnd");

View File

@@ -9,6 +9,7 @@ using GASSamples.Scripts.Game.View;
using JNGame.Sync.Entity;
using JNGame.Sync.Frame;
using JNGame.Sync.System;
using JNGame.Sync.System.Data;
namespace DefaultNamespace
{
@@ -30,6 +31,7 @@ namespace DefaultNamespace
public override SDataSystemBase[] NewDataSystems()
{
return new SDataSystemBase[] {
new GEventDataSystem(SEventDataSystem.SEventDataEnum.ServerClient),
new JNGASBoxDataSystem(),
};
}