临时提交

This commit is contained in:
PC-20230316NUNE\Administrator
2024-10-18 17:48:59 +08:00
parent 8cea537319
commit 31db916fec
31 changed files with 315 additions and 107 deletions

View File

@@ -4,12 +4,13 @@ using UnityEngine;
namespace GAS.Runtime
{
public class AbilitySystemComponent : MonoBehaviour, IAbilitySystemComponent
public class AbilitySystemComponent : IAbilitySystemComponent
{
[SerializeField]
private AbilitySystemComponentPreset preset;
public AbilitySystemComponentPreset Preset => preset;
public int EntityId { get; protected set; }
public int Level { get; protected set; }
@@ -190,7 +191,7 @@ namespace GAS.Runtime
if (gameplayEffectSpec == null)
{
#if UNITY_EDITOR
Debug.LogError($"[EX] Try To Apply a invalid EntityRef of GameplayEffectSpec From {name} To {target.name}!");
Debug.LogError($"[EX] Try To Apply a invalid EntityRef of GameplayEffectSpec From {EntityId} To {target.EntityId}!");
#endif
return null;
}
@@ -203,7 +204,7 @@ namespace GAS.Runtime
if (gameplayEffect == null)
{
#if UNITY_EDITOR
Debug.LogError($"[EX] Try To Apply a NULL GameplayEffect From {name} To {target.name}!");
Debug.LogError($"[EX] Try To Apply a NULL GameplayEffect From {EntityId} To {target.EntityId}!");
#endif
return null;
}
@@ -217,7 +218,7 @@ namespace GAS.Runtime
if (gameplayEffect == null)
{
#if UNITY_EDITOR
Debug.LogError($"[EX] Try To Apply a NULL GameplayEffect From {name} To {target.name}!");
Debug.LogError($"[EX] Try To Apply a NULL GameplayEffect From {EntityId} To {target.EntityId}!");
#endif
return null;
}
@@ -398,5 +399,15 @@ namespace GAS.Runtime
{
GameplayEffectContainer.ClearGameplayEffect();
}
/// <summary>
/// 返回视图
/// </summary>
/// <returns></returns>
public virtual GameObject GetView()
{
return null;
}
}
}
}

View File

@@ -0,0 +1,21 @@
using UnityEngine;
namespace GAS.Runtime
{
public class AbilitySystemPreviewComponent : AbilitySystemComponent
{
private GameObject view;
public AbilitySystemPreviewComponent(GameObject view)
{
this.view = view;
}
public override GameObject GetView()
{
return view;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d737dff4fee4418e997631c8d083de40
timeCreated: 1729243645