using System; using System.Collections.Generic; using Goap.Core; namespace Goap.Runtime { [Serializable] public class GoalConfig : IGoalConfig, IClassCallbackConfig { public GoalConfig() { } public GoalConfig(Type type) { this.Name = type.Name; this.ClassType = type.AssemblyQualifiedName; } public string Name { get; set; } public string ClassType { get; set; } public float BaseCost { get; set; } public List Conditions { get; set; } = new(); public Action Callback { get; set; } public static GoalConfig Create() where TGoal : IGoal { return new GoalConfig(typeof(TGoal)); } } }