mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交行为树
This commit is contained in:
@@ -9,10 +9,13 @@ namespace JNGame.Math
|
||||
{
|
||||
public static partial class LFloatExtension
|
||||
{
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public static LFloat ToLFloat(this float value)
|
||||
{
|
||||
return new LFloat(true, (long)(value * LFloat.Precision));
|
||||
}
|
||||
#endif
|
||||
|
||||
public static LFloat ToLFloat(this int value)
|
||||
{
|
||||
|
@@ -629,20 +629,35 @@ namespace JNGame.Math
|
||||
public static LFloat L0 => 0.ToLFloat();
|
||||
|
||||
/// <summary>
|
||||
/// 10
|
||||
/// 0.5
|
||||
/// </summary>
|
||||
public static LFloat L0D5 => new("",500);
|
||||
|
||||
/// <summary>
|
||||
/// 10
|
||||
/// 1
|
||||
/// </summary>
|
||||
public static readonly LFloat L1 = 1.ToLFloat();
|
||||
|
||||
/// <summary>
|
||||
/// 2
|
||||
/// </summary>
|
||||
public static readonly LFloat L2 = 2.ToLFloat();
|
||||
|
||||
/// <summary>
|
||||
/// 5
|
||||
/// </summary>
|
||||
public static readonly LFloat L5 = 5.ToLFloat();
|
||||
|
||||
/// <summary>
|
||||
/// 10
|
||||
/// </summary>
|
||||
public static readonly LFloat L10 = 10.ToLFloat();
|
||||
|
||||
/// <summary>
|
||||
/// 20
|
||||
/// </summary>
|
||||
public static readonly LFloat L20 = 20.ToLFloat();
|
||||
|
||||
/// <summary>
|
||||
/// 100
|
||||
/// </summary>
|
||||
|
@@ -102,6 +102,19 @@ namespace JNGame.Math
|
||||
this.z.rawValue = z * LFloat.Precision;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 构造3D向量:使用2个LFloat
|
||||
/// </summary>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <param name="z"></param>
|
||||
public LVector3(LFloat x, LFloat y)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = LFloat.L0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 构造3D向量:使用3个LFloat
|
||||
/// </summary>
|
||||
|
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1eeb16ca38eda43488399b77e784774c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -22,7 +22,7 @@ namespace GAS.Runtime
|
||||
/// <summary>
|
||||
/// 表现层返回的Cue实例索引ID,用于逻辑层通知表现层移除使用,与逻辑层业务逻辑无关
|
||||
/// </summary>
|
||||
private int m_CueIndex = -1;
|
||||
private ulong m_CueIndex = 0;
|
||||
|
||||
protected override void OnStart(TimelineWorkingContext workingContext)
|
||||
{
|
||||
@@ -37,7 +37,7 @@ namespace GAS.Runtime
|
||||
{
|
||||
if (m_CueIndex < 0) { return; }
|
||||
workingContext.OwnerAbility.Owner.OnCueRemove(workingContext.OwnerAbility, m_CueIndex);
|
||||
m_CueIndex = -1;
|
||||
m_CueIndex = 0;
|
||||
}
|
||||
|
||||
protected override void OnDestroy(TimelineWorkingContext workingContext)
|
||||
|
@@ -348,14 +348,14 @@ namespace GAS.Runtime
|
||||
/// <param name="cueAssetLocation">Cue资源地址</param>
|
||||
/// <param name="durationTime">持续时间</param>
|
||||
/// <returns></returns>
|
||||
public abstract int OnCueAdd(AbilitySpec abilitySpec, string cueAssetLocation, int durationTime);
|
||||
public abstract ulong OnCueAdd(AbilitySpec abilitySpec, string cueAssetLocation, int durationTime);
|
||||
|
||||
/// <summary>
|
||||
/// Ability的Timeline轨道触发了持续型Cue的移除
|
||||
/// </summary>
|
||||
/// <param name="abilitySpec"></param>
|
||||
/// <param name="cueClipIndex"></param>
|
||||
public abstract void OnCueRemove(AbilitySpec abilitySpec, int cueClipIndex);
|
||||
public abstract void OnCueRemove(AbilitySpec abilitySpec, ulong cueClipIndex);
|
||||
|
||||
/// <summary>
|
||||
/// Ability的Timeline轨道触发了瞬时Cue的触发
|
||||
|
@@ -43,6 +43,7 @@ namespace JNGame.Runtime.GAS.Runtime
|
||||
public void Register(AbilitySystemComponent abilitySystemComponent)
|
||||
{
|
||||
if (AbilitySystemComponents.Contains(abilitySystemComponent)) return;
|
||||
abilitySystemComponent.Manager = this;
|
||||
AbilitySystemComponents.Add(abilitySystemComponent);
|
||||
abilitySystemComponent.OnAwake();
|
||||
}
|
||||
|
Reference in New Issue
Block a user