init
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using RPGCore.Core.Objects;
|
||||
using RPGCore.StatusEffect.ObjectModules.StatusObjectModule.Effects;
|
||||
using RPGCoreCommon.DynamicValues;
|
||||
using RPGCoreCommon.Helpers.CustomTypes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RPGCore.StatusEffect.ObjectModules.StatusObjectModule
|
||||
{
|
||||
[Serializable]
|
||||
[CreateAssetMenu(menuName = "RPG Core/Status")]
|
||||
public class StatusDefinitionSO : ScriptableObject
|
||||
{
|
||||
[Header("Connected to:")]
|
||||
[SerializableType(typeof(BaseObject), allowAbstract: true)] public SerializableType forType;
|
||||
|
||||
[Header("Display")]
|
||||
public string displayName;
|
||||
public bool hidden;
|
||||
public Texture2D displayIcon;
|
||||
[DynamicValue(DynamicValueType.ByDynamicTypes)] public DynamicValue description;
|
||||
|
||||
[Header("Duration")]
|
||||
public bool permanent;
|
||||
[Min(0)] public float time;
|
||||
|
||||
[Header("Effects")]
|
||||
[SerializeReference] public List<Effect> effects = new();
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
description.RemoveDynamicTypes();
|
||||
description.SetDynamicType("object", forType);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user