using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using System;
|
#if UNITY_EDITOR
|
using UnityEditor;
|
#endif
|
public class TalentSkillScriptableObject : ScriptableObject
|
{
|
[SerializeField] Vector3[] m_SkillPositions;
|
[SerializeField] Arrow[] m_Arows;
|
[SerializeField] float m_ContentHeight;
|
public Vector3 GetSkillPosition(int index)
|
{
|
if (m_SkillPositions != null && index >= 0 && index < m_SkillPositions.Length)
|
{
|
return m_SkillPositions[index];
|
}
|
return Vector3.zero;
|
}
|
|
public Arrow GetArrow(int index)
|
{
|
if (m_Arows != null && index >= 0 && index < m_Arows.Length)
|
{
|
return m_Arows[index];
|
}
|
return default(Arrow);
|
}
|
|
public float contentHeight
|
{
|
get { return m_ContentHeight; }
|
}
|
|
[Serializable]
|
public struct Arrow
|
{
|
public int type;
|
public Vector3 position;
|
public Vector3 eulerAngle;
|
public Vector2 sizeDelta;
|
}
|
|
|
#if UNITY_EDITOR
|
[MenuItem("策划工具/生成天赋技能配置文件")]
|
static void BuildMeridianConfig()
|
{
|
TalentSkillScriptableObject _config = CreateInstance<TalentSkillScriptableObject>();
|
string _path = StringUtility.Contact("Assets/Resources/ScriptableObject/Config/",
|
"TalentSkill_",
|
".asset");
|
AssetDatabase.CreateAsset(_config, _path);
|
AssetDatabase.Refresh();
|
ProjectWindowUtil.ShowCreatedAsset(_config);
|
}
|
#endif
|
}
|