本文整理汇总了C#中Prolog.LogicVariable.Unify方法的典型用法代码示例。如果您正苦于以下问题:C# LogicVariable.Unify方法的具体用法?C# LogicVariable.Unify怎么用?C# LogicVariable.Unify使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Prolog.LogicVariable
的用法示例。
在下文中一共展示了LogicVariable.Unify方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EnumerateIList
static IEnumerable<CutState> EnumerateIList(IList listArg, LogicVariable objectArg)
{
foreach (var e in listArg)
{
#pragma warning disable 414, 168, 219
// ReSharper disable once UnusedVariable
foreach (var ignore in objectArg.Unify(e))
#pragma warning restore 414, 168, 219
yield return CutState.Continue;
}
}
示例2: EnumerateGameObjectsAndComponents
private static IEnumerable<CutState> EnumerateGameObjectsAndComponents(LogicVariable v, LogicVariable gov, Type type)
{
foreach (var component in UnityEngine.Object.FindObjectsOfType(type))
{
#pragma warning disable 414, 168, 219
// ReSharper disable UnusedVariable
foreach (var ignore in v.Unify(component))
foreach (var ignore2 in gov.Unify(((Component)component).gameObject))
// ReSharper restore UnusedVariable
#pragma warning restore 414, 168, 219
yield return CutState.Continue;
}
}
示例3: EnumerateComponents
private static IEnumerable<CutState> EnumerateComponents(LogicVariable v, GameObject gameObject, Type type)
{
foreach (var c in gameObject.GetComponents(type))
{
#pragma warning disable 414, 168, 219
// ReSharper disable once UnusedVariable
foreach (var ignore in v.Unify(c))
#pragma warning restore 414, 168, 219
yield return CutState.Continue;
}
}
示例4: EnumerateChildren
private static IEnumerable<CutState> EnumerateChildren(LogicVariable child, GameObject parent)
{
var transform = parent.transform;
for (int i=0; i<transform.childCount; i++)
#pragma warning disable 414, 168, 219
// ReSharper disable once UnusedVariable
foreach (var ignore in child.Unify(transform.GetChild(i).gameObject))
#pragma warning restore 414, 168, 219
yield return CutState.Continue;
}