装备系统完结,修复并加入很多
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "NewEquipmentSkillGroup", menuName = "Equipment/Equipment Skill Group")]
|
||||
public class EquipmentSkillGroupSO : ScriptableObject
|
||||
{
|
||||
public enum EquipmentSkillCategory
|
||||
{
|
||||
Special,
|
||||
Illusion
|
||||
}
|
||||
|
||||
[Header("Category")]
|
||||
public EquipmentSkillCategory category = EquipmentSkillCategory.Special;
|
||||
|
||||
[Header("Skill Group")]
|
||||
public SkillGroup skillGroup = new SkillGroup();
|
||||
|
||||
public int SkillGroupID => skillGroup != null ? Mathf.Max(0, skillGroup.skillGroupID) : 0;
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
if (skillGroup == null)
|
||||
{
|
||||
skillGroup = new SkillGroup();
|
||||
}
|
||||
|
||||
if (skillGroup.skillGroupID < 0)
|
||||
{
|
||||
skillGroup.skillGroupID = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user