mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 10:46:17 +00:00
简单提交
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
|
||||
namespace JNGame.GAS
|
||||
{
|
||||
/// <summary>
|
||||
/// GAS代码注入
|
||||
/// </summary>
|
||||
public partial class GASInjector
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.InitializeOnLoad]
|
||||
class AutoInject
|
||||
{
|
||||
static AutoInject()
|
||||
{
|
||||
GASInjector.Inject();
|
||||
UnityEngine.Debug.Log("AutoRegister");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private GASInjector() { }
|
||||
|
||||
public static void Inject()
|
||||
{
|
||||
var injector = new GASInjector();
|
||||
injector.InternalAbilityTaskInject();
|
||||
injector.InternalTargetCatcherInject();
|
||||
injector.InternalMMCInject();
|
||||
}
|
||||
|
||||
private partial void InternalAbilityTaskInject();
|
||||
private partial void InternalTargetCatcherInject();
|
||||
private partial void InternalMMCInject();
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 07bc2f76183f4a82b1855c7426a7db31
|
||||
timeCreated: 1729578878
|
@@ -16,7 +16,7 @@ namespace Demo.Scripts.GAS.GameplayCue
|
||||
[LabelText("结束位置")]
|
||||
public LVector3 end;
|
||||
|
||||
public override GameplayCueDurationalSpec CreateSpec(GameplayCueParameters parameters)
|
||||
protected override GameplayCueDurationalSpec CreateSpec(GameplayCueParameters parameters)
|
||||
{
|
||||
return new GameplayCueDurational_PlayerDemo01_Spec(this,parameters);
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ namespace Demo.Scripts.GAS.GameplayCue
|
||||
{
|
||||
public class GameplayCue_PlayerDemo01 : GameplayCueInstant
|
||||
{
|
||||
public override GameplayCueInstantSpec CreateSpec(GameplayCueParameters parameters)
|
||||
protected override GameplayCueInstantSpec CreateSpec(GameplayCueParameters parameters)
|
||||
{
|
||||
Debug.Log($"GameplayCue_PlayerDemo01 CreateSpec");
|
||||
return new GameplayCue_PlayerDemo01_Spec(this,parameters);
|
||||
|
@@ -7,7 +7,7 @@ namespace Demo.Scripts.GAS.GameplayCue
|
||||
{
|
||||
public class GameplayCue_PlayerDemo02 : GameplayCueInstant
|
||||
{
|
||||
public override GameplayCueInstantSpec CreateSpec(GameplayCueParameters parameters)
|
||||
protected override GameplayCueInstantSpec CreateSpec(GameplayCueParameters parameters)
|
||||
{
|
||||
Debug.Log($"GameplayCue_PlayerDemo02 CreateSpec");
|
||||
return new GameplayCue_PlayerDemo02_Spec(this,parameters);
|
||||
|
@@ -1,13 +1,14 @@
|
||||
using GAS.Runtime;
|
||||
using JNGame.Math;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Scripts.GAS.OngoingAbilityTasks
|
||||
namespace JNGame.GAS
|
||||
{
|
||||
public class OngoingAbility_Debug : OngoingAbilityTask
|
||||
public partial class OngoingAbility_Debug : OngoingAbilityTask
|
||||
{
|
||||
|
||||
public Vector3 start;
|
||||
public Vector3 end;
|
||||
public LVector3 start;
|
||||
public LVector3 end;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <summary>
|
||||
@@ -19,7 +20,7 @@ namespace Demo.Scripts.GAS.OngoingAbilityTasks
|
||||
/// <param name="endFrame"></param>
|
||||
public override void OnEditorPreview(int frame, int startFrame, int endFrame)
|
||||
{
|
||||
Debug.Log($"OnEditorPreview {Vector3.Lerp(start,end,(float)frame / (float)endFrame)}");
|
||||
Debug.Log($"OnEditorPreview {Vector3.Lerp(start.ToVector3(),end.ToVector3(),(float)frame / (float)endFrame)}");
|
||||
// _spec.Owner.gameObject.transform.position = Vector3.Lerp(start, end, (float)startFrame / endFrame);
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user