53 lines
1.2 KiB
C#
53 lines
1.2 KiB
C#
using NodeCanvas.Framework;
|
|
using ParadoxNotion;
|
|
using ParadoxNotion.Design;
|
|
using Sirenix.OdinInspector;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace Ether
|
|
{
|
|
[Category("✫ 扩展条件")]
|
|
public class CheckDialogueState : ConditionTask
|
|
{
|
|
[LabelText("条件Id")]
|
|
public List<int> conditionList = new List<int>();
|
|
|
|
protected override string info
|
|
{
|
|
get
|
|
{
|
|
string str = "检查条件({0})是否符合";
|
|
|
|
string joinStr = string.Join(",", conditionList);
|
|
|
|
if (string.IsNullOrEmpty(joinStr))
|
|
{
|
|
joinStr = "无";
|
|
}
|
|
|
|
str = string.Format(str, joinStr);
|
|
|
|
return str;
|
|
}
|
|
}
|
|
|
|
protected override bool OnCheck()
|
|
{
|
|
bool state = true;
|
|
|
|
foreach (int condition in conditionList)
|
|
{
|
|
if (!ConditionSystem.Inst.GetConditionState(condition))
|
|
{
|
|
state = false;
|
|
break;
|
|
}
|
|
}
|
|
|
|
return state;
|
|
}
|
|
}
|
|
}
|