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,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70bc0ba32472468e8765e4c1f7acbcdf
|
||||
timeCreated: 1729224096
|
@@ -0,0 +1,74 @@
|
||||
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>
|
||||
{
|
||||
|
||||
private GameplayCueDurational_PlayerDemo01 Cue;
|
||||
|
||||
public GameplayCueDurational_PlayerDemo01_Spec(GameplayCueDurational_PlayerDemo01 cue, GameplayCueParameters parameters) : base(cue, parameters)
|
||||
{
|
||||
Cue = cue;
|
||||
}
|
||||
|
||||
public override void OnAdd(int frame,int startFrame,int endFrame)
|
||||
{
|
||||
Debug.Log("GameplayCueDurational_PlayerDemo01_Spec OnAdd");
|
||||
}
|
||||
|
||||
public override void OnRemove(int frame,int startFrame,int endFrame)
|
||||
{
|
||||
Debug.Log("GameplayCueDurational_PlayerDemo01_Spec OnRemove");
|
||||
}
|
||||
|
||||
public override void OnGameplayEffectActivate()
|
||||
{
|
||||
Debug.Log("GameplayCueDurational_PlayerDemo01_Spec OnGameplayEffectActivate");
|
||||
}
|
||||
|
||||
public override void OnGameplayEffectDeactivate()
|
||||
{
|
||||
Debug.Log("GameplayCueDurational_PlayerDemo01_Spec OnGameplayEffectDeactivate");
|
||||
}
|
||||
|
||||
public override void OnTick(int frame,int startFrame,int endFrame)
|
||||
{
|
||||
Debug.Log($"GameplayCueDurational_PlayerDemo01_Spec OnTick {frame}");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 321af3379125465380073b2a04a1b1e2
|
||||
timeCreated: 1729234472
|
@@ -0,0 +1,36 @@
|
||||
using GAS.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Scripts.GAS.GameplayCue
|
||||
{
|
||||
public class GameplayCue_PlayerDemo01 : GameplayCueInstant
|
||||
{
|
||||
public override GameplayCueInstantSpec CreateSpec(GameplayCueParameters parameters)
|
||||
{
|
||||
Debug.Log($"GameplayCue_PlayerDemo01 CreateSpec");
|
||||
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
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 364e48fdbe4b487f8a05c7b78291559c
|
||||
timeCreated: 1729220475
|
@@ -0,0 +1,42 @@
|
||||
using GAS.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Scripts.GAS.OngoingAbilityTasks
|
||||
{
|
||||
public class OngoingAbility_Debug : OngoingAbilityTask
|
||||
{
|
||||
|
||||
public Vector3 start;
|
||||
public Vector3 end;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// 编辑器预览用
|
||||
/// 【注意】 覆写时,记得用UNITY_EDITOR宏包裹,这是预览表现用的函数,不该被编译。
|
||||
/// </summary>
|
||||
/// <param name="frame"></param>
|
||||
/// <param name="startFrame"></param>
|
||||
/// <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)}");
|
||||
// _spec.Owner.gameObject.transform.position = Vector3.Lerp(start, end, (float)startFrame / endFrame);
|
||||
}
|
||||
#endif
|
||||
|
||||
public override void OnStart(int startFrame)
|
||||
{
|
||||
Debug.Log("OnEnd");
|
||||
}
|
||||
|
||||
public override void OnEnd(int endFrame)
|
||||
{
|
||||
Debug.Log("OnEnd");
|
||||
}
|
||||
|
||||
public override void OnTick(int frameIndex, int startFrame, int endFrame)
|
||||
{
|
||||
Debug.Log("OnTick");
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f6034c656814b79b9be57cd41b35d9a
|
||||
timeCreated: 1729220520
|
Reference in New Issue
Block a user