36 lines
866 B
C#
36 lines
866 B
C#
/*
|
|
* @Author: 白哉
|
|
* @Description:
|
|
* @Date: 2025年06月06日 星期五 19:06:16
|
|
* @Modify:
|
|
*/
|
|
|
|
|
|
using System;
|
|
using Logic.AI;
|
|
using NodeCanvas.Framework;
|
|
using ParadoxNotion.Design;
|
|
|
|
|
|
namespace NodeCanvas.Tasks.Actions
|
|
{
|
|
[Category("AICondition")]
|
|
[Serializable]
|
|
public class CountryStrategyCondition : BaseCondition
|
|
{
|
|
public Strategy CountryStrategy;
|
|
|
|
protected override string desc
|
|
{
|
|
get { return string.Format($"当国家战略为: {CountryStrategy} 时"); }
|
|
}
|
|
|
|
protected override bool OnCheck()
|
|
{
|
|
// 直接从Blackboard获取AICalculatorData
|
|
var data = blackboard.GetVariable<AICalculatorData>("Data");
|
|
if (data?.value == null) return false;
|
|
return CountryStrategy == data.value.CountryStrategy;
|
|
}
|
|
}
|
|
} |