IndieGame/client/Assets/ParadoxNotion/NodeCanvas/Tasks/Actions/Blackboard/SetInt.cs
DOBEST\zhaoyingjie f242607587 初始化工程
2024-10-11 10:12:15 +08:00

29 lines
769 B
C#

using NodeCanvas.Framework;
using ParadoxNotion;
using ParadoxNotion.Design;
namespace NodeCanvas.Tasks.Actions
{
[Name("Set Integer")]
[Category("✫ Blackboard")]
[Description("Set a blackboard integer variable")]
public class SetInt : ActionTask
{
[BlackboardOnly]
public BBParameter<int> valueA;
public OperationMethod Operation = OperationMethod.Set;
public BBParameter<int> valueB;
protected override string info {
get { return valueA + OperationTools.GetOperationString(Operation) + valueB; }
}
protected override void OnExecute() {
valueA.value = OperationTools.Operate(valueA.value, valueB.value, Operation);
EndAction();
}
}
}