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

24 lines
680 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("Loads the blackboard variables previously saved in the provided PlayerPrefs key if at all. Returns false if no saves found or load was failed")]
public class LoadBlackboard : ActionTask<Blackboard>
{
[RequiredField]
public BBParameter<string> saveKey;
protected override string info {
get { return string.Format("Load Blackboard [{0}]", saveKey.ToString()); }
}
protected override void OnExecute() {
EndAction(agent.Load(saveKey.value));
}
}
}