34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
using Newtonsoft.Json.Linq;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace NEG.Utils.Achivments
|
|
{
|
|
[CreateAssetMenu(menuName = "Achivments/AchivmentDefinition")]
|
|
public class AchivmentDefinition : ScriptableObject
|
|
{
|
|
public JToken AdditionalData
|
|
{
|
|
get
|
|
{
|
|
additionalData ??= JObject.Parse(additionalDataInitializer);
|
|
return additionalData;
|
|
}
|
|
}
|
|
|
|
[field: SerializeField]
|
|
public string Id { get; private set; }
|
|
|
|
[field: Tooltip("Amount of progress required for completion, required to be at leas 1, otherwise would be considered completed from the beginning")]
|
|
[field: Min(1)]
|
|
[field: SerializeField]
|
|
public int ProgressRequired { get; private set; } = 1;
|
|
|
|
[SerializeField]
|
|
[Tooltip("Temporary until json editor is a thing")]
|
|
private string additionalDataInitializer;
|
|
|
|
private JToken additionalData;
|
|
}
|
|
} |