IndieGame/client/Assets/ParadoxNotion/NodeCanvas/Tasks/Actions/Blackboard/SaveBlackboard.cs

25 lines
629 B
C#
Raw Normal View History

2024-10-11 10:12:15 +08:00
using NodeCanvas.Framework;
using ParadoxNotion.Design;
namespace NodeCanvas.Tasks.Actions
{
[Category("✫ Blackboard")]
[Description("Saves the blackboard variables in the provided key and to be loaded later on")]
public class SaveBlackboard : ActionTask<Blackboard>
{
[RequiredField]
public BBParameter<string> saveKey;
protected override string info {
get { return string.Format("Save Blackboard [{0}]", saveKey.ToString()); }
}
protected override void OnExecute() {
agent.Save(saveKey.value);
EndAction();
}
}
}