Unify() публичный Метод

Attempt to unify the logic variable against the specified value (may be another logic variable or not).
public Unify ( object value ) : IEnumerable
value object
Результат IEnumerable
Пример #1
0
        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
0
        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
0
        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
0
 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;
 }