29 lines
1.4 KiB
C#
29 lines
1.4 KiB
C#
using SLSUtilities.General;
|
||
using Sirenix.OdinInspector;
|
||
using UnityEngine;
|
||
using UnityEngine.Serialization;
|
||
|
||
namespace Continentis.MainGame.Character
|
||
{
|
||
/// <summary>
|
||
/// 角色属性默认值模板。
|
||
/// 放置于 Assets/Mods/{ModName}/Characters/DefaultCollections/ 路径下才会被 PasteDefaultAttributes 识别并导入。
|
||
/// </summary>
|
||
[CreateAssetMenu(menuName = "Continentis/MainGame/Character/AttributesDefaultCollection",
|
||
fileName = "CharacterAttributesDefaultCollection")]
|
||
public class CharacterAttributesDefaultCollection : ScriptableObject
|
||
{
|
||
[TitleGroup("属性模板")]
|
||
|
||
[DictionaryDrawerSettings(KeyLabel = "属性名", ValueLabel = "属性值")]
|
||
[LabelText("属性 (General)")]
|
||
[Tooltip("对应 CharacterData.generalAttributes")]
|
||
public SerializableDictionary<string, float> generalAttributes;
|
||
|
||
[FormerlySerializedAs("endowingGeneralAttributes")]
|
||
[DictionaryDrawerSettings(KeyLabel = "属性名", ValueLabel = "初始值表达式")]
|
||
[LabelText("运行时通常属性 (Runtime General)")]
|
||
[Tooltip("初始化时赋予给 CurrentGeneralAttributes 的属性;Value 填写对应 GeneralAttributes 的 Key 名(或一个常数),留空则默认为 0。")]
|
||
public SerializableDictionary<string, string> runtimeGeneralAttributes;
|
||
}
|
||
} |