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,65 @@
|
||||
using GAS.General;
|
||||
using GAS.Runtime;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Scripts.GAS.GameplayCue
|
||||
{
|
||||
public class GameplayCueDurational_PlayerDemo01 : GameplayCueDurational
|
||||
{
|
||||
|
||||
[BoxGroup]
|
||||
[LabelText("开始位置")]
|
||||
public Vector3 start;
|
||||
[BoxGroup]
|
||||
[LabelText("结束位置")]
|
||||
public Vector3 end;
|
||||
|
||||
public override GameplayCueDurationalSpec CreateSpec(GameplayCueParameters parameters)
|
||||
{
|
||||
return new GameplayCueDurational_PlayerDemo01_Spec(this,parameters);
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public override void OnEditorPreview(GameObject previewObject, int frameIndex, int startFrame, int endFrame)
|
||||
{
|
||||
Debug.Log($"GameplayCue_PlayerDemo01 {previewObject} {frameIndex}");
|
||||
|
||||
if (frameIndex >= startFrame && frameIndex <= endFrame)
|
||||
{
|
||||
previewObject.transform.position = Vector3.Lerp(start, end, (float)(frameIndex - startFrame) / endFrame);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
public class GameplayCueDurational_PlayerDemo01_Spec : GameplayCueDurationalSpec<GameplayCueDurational_PlayerDemo01>
|
||||
{
|
||||
public GameplayCueDurational_PlayerDemo01_Spec(GameplayCueDurational_PlayerDemo01 cue, GameplayCueParameters parameters) : base(cue, parameters)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnAdd()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnRemove()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnGameplayEffectActivate()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnGameplayEffectDeactivate()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnTick()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 321af3379125465380073b2a04a1b1e2
|
||||
timeCreated: 1729234472
|
@@ -0,0 +1,35 @@
|
||||
using GAS.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Scripts.GAS.GameplayCue
|
||||
{
|
||||
public class GameplayCue_PlayerDemo01 : GameplayCueInstant
|
||||
{
|
||||
public override GameplayCueInstantSpec CreateSpec(GameplayCueParameters parameters)
|
||||
{
|
||||
return new GameplayCue_PlayerDemo01_Spec(this,parameters);
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public override void OnEditorPreview(GameObject previewObject, int frame, int startFrame)
|
||||
{
|
||||
Debug.Log($"GameplayCue_PlayerDemo01 {previewObject}");
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
public class GameplayCue_PlayerDemo01_Spec : GameplayCueInstantSpec
|
||||
{
|
||||
|
||||
public GameplayCue_PlayerDemo01_Spec(GameplayCueInstant cue, GameplayCueParameters parameters) : base(cue, parameters)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Trigger()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec56ec3ecd444759979c63b23ecf0c39
|
||||
timeCreated: 1729233357
|
Reference in New Issue
Block a user