You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
2.8 KiB
94 lines
2.8 KiB
using System;
|
|
using AOT;
|
|
using GAS.Runtime;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
namespace CoreGame.Render
|
|
{
|
|
[CreateAssetMenu(fileName = "GA_Rush", menuName = "GameAsset/Ability/GARushAsset")]
|
|
public sealed class GARushAsset : AbilityAsset
|
|
{
|
|
public enum RushType
|
|
{
|
|
GetTo,
|
|
Toward
|
|
}
|
|
|
|
public float speed;
|
|
public RushType rushType;
|
|
[ShowIf("rushType", RushType.Toward)] public float distance;
|
|
|
|
public Vector2 boxSize;
|
|
public string startAnimStateName;
|
|
private FName m_AnimStateName;
|
|
public FName StartAnimStateNameFName{
|
|
get
|
|
{
|
|
if (m_AnimStateName.comparisonIndex == 0)
|
|
{
|
|
m_AnimStateName = UnrealNames.GetFName(startAnimStateName);
|
|
}
|
|
return m_AnimStateName;
|
|
}
|
|
}
|
|
public float startAnimDuration;
|
|
public string loopAnimStateName;
|
|
private FName m_LoopAnimStateName;
|
|
public FName LoopAnimStateNameFName{
|
|
get
|
|
{
|
|
if (m_LoopAnimStateName.comparisonIndex == 0)
|
|
{
|
|
m_LoopAnimStateName = UnrealNames.GetFName(loopAnimStateName);
|
|
}
|
|
return m_LoopAnimStateName;
|
|
}
|
|
}
|
|
public string endAnimStateName;
|
|
private FName m_EndAnimStateName;
|
|
public FName EndAnimStateNameFName{
|
|
get
|
|
{
|
|
if (m_EndAnimStateName.comparisonIndex == 0)
|
|
{
|
|
m_EndAnimStateName = UnrealNames.GetFName(endAnimStateName);
|
|
}
|
|
return m_EndAnimStateName;
|
|
}
|
|
}
|
|
public float endAnimDuration;
|
|
public int castPointSelectCfgId;
|
|
public int castHurtSkillId;
|
|
public int castEffectId;
|
|
public string rushSound;
|
|
|
|
#if UNITY_EDITOR
|
|
[ShowInInspector]
|
|
[HideReferenceObjectPicker]
|
|
[ShowIf("CastPointSelectCfg")]
|
|
private GECastPointSelectDesc CastPointSelectCfg =>
|
|
GECastPointSelectDescMgr.Instance.GetConfig(castPointSelectCfgId);
|
|
|
|
[ShowInInspector]
|
|
[HideReferenceObjectPicker]
|
|
[ShowIf("SkillCfg")]
|
|
private SkillDesc SkillCfg => SkillDescMgr.Instance.GetConfig(castHurtSkillId);
|
|
|
|
[ShowInInspector]
|
|
[HideReferenceObjectPicker]
|
|
[ShowIf("RenderEffectCfg")]
|
|
private RenderEffectDesc RenderEffectCfg => RenderEffectDescMgr.Instance.GetConfig(castEffectId);
|
|
|
|
[ShowInInspector]
|
|
[HideReferenceObjectPicker]
|
|
[ShowIf("SoundCfg")]
|
|
private SoundDesc SoundCfg => SoundDescMgr.Instance.GetConfig(rushSound);
|
|
#endif
|
|
|
|
public override Type AbilityType()
|
|
{
|
|
return typeof(GARush);
|
|
}
|
|
}
|
|
}
|