mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-26 18:26:23 +00:00
临时提交
This commit is contained in:
@@ -37,28 +37,41 @@ namespace Demo.Scripts.GAS.GameplayCue
|
||||
|
||||
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()
|
||||
public override void OnAdd(int frame,int startFrame,int endFrame)
|
||||
{
|
||||
Debug.Log("GameplayCueDurational_PlayerDemo01_Spec OnAdd");
|
||||
}
|
||||
|
||||
public override void OnRemove()
|
||||
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()
|
||||
public override void OnTick(int frame,int startFrame,int endFrame)
|
||||
{
|
||||
Debug.Log($"GameplayCueDurational_PlayerDemo01_Spec OnTick {frame}");
|
||||
if (Owner.GetView() is not null)
|
||||
{
|
||||
Owner.GetView().transform.position = Vector3.Lerp(Cue.start, Cue.end, (float)(frame - startFrame) / endFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
28
JEX_GAS/Assets/Demo/Scripts/Gen/GAbilityLib.gen.cs
Normal file
28
JEX_GAS/Assets/Demo/Scripts/Gen/GAbilityLib.gen.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
///////////////////////////////////
|
||||
//// This is a generated file. ////
|
||||
//// Do not modify it. ////
|
||||
///////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GAS.Runtime
|
||||
{
|
||||
public static class GAbilityLib
|
||||
{
|
||||
public struct AbilityInfo
|
||||
{
|
||||
public string Name;
|
||||
public string AssetPath;
|
||||
public Type AbilityClassType;
|
||||
}
|
||||
|
||||
public static AbilityInfo JisolDemo1 = new AbilityInfo { Name = "JisolDemo1", AssetPath = "Assets/Demo/GAS/Config/GameplayAbilityLib/JisolDemo1.asset",AbilityClassType = typeof(GAS.Runtime.TimelineAbility) };
|
||||
|
||||
|
||||
public static Dictionary<string, AbilityInfo> AbilityMap = new Dictionary<string, AbilityInfo>
|
||||
{
|
||||
["JisolDemo1"] = JisolDemo1,
|
||||
};
|
||||
}
|
||||
}
|
11
JEX_GAS/Assets/Demo/Scripts/Gen/GAbilityLib.gen.cs.meta
Normal file
11
JEX_GAS/Assets/Demo/Scripts/Gen/GAbilityLib.gen.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 79aaab94f725e0347b32b6383dc6361e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
18
JEX_GAS/Assets/Demo/Scripts/Main.cs
Normal file
18
JEX_GAS/Assets/Demo/Scripts/Main.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using GAS.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Scripts
|
||||
{
|
||||
public class Main : MonoBehaviour
|
||||
{
|
||||
|
||||
public AbilitySystemComponent player;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
player.InitWithPreset(1);
|
||||
player.TryActivateAbility(GAbilityLib.JisolDemo1.Name);
|
||||
}
|
||||
}
|
||||
}
|
3
JEX_GAS/Assets/Demo/Scripts/Main.cs.meta
Normal file
3
JEX_GAS/Assets/Demo/Scripts/Main.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c3aa2f58b904ebe9fc64cc367c63d68
|
||||
timeCreated: 1729236756
|
Reference in New Issue
Block a user