void FilterConditions <TComponentRootType>(TComponentRootType target) where TComponentRootType : Component, IMRObject
 {
     using (var componentFilter = new CachedComponentFilter <ICondition, TComponentRootType>(target, CachedSearchType.Self | CachedSearchType.Parents, false))
     {
         GatherComponents(componentFilter);
     }
 }
 public ProxyConditions(ICondition[] conditions)
 {
     using (var componentFilter = new CachedComponentFilter <ICondition, Component>(conditions, false))
     {
         GatherComponents(componentFilter);
     }
 }
 void FilterRelations(ProxyGroup target)
 {
     Count = 0;
     using (var componentFilter = new CachedComponentFilter <IRelation, ProxyGroup>(target, CachedSearchType.Self | CachedSearchType.Parents, false))
     {
         GatherComponents(componentFilter);
     }
 }
 public Relations(IRelation[] relations, Dictionary <IMRObject, SetChildArgs> children = null)
 {
     this.children = children;
     using (var componentFilter = new CachedComponentFilter <IRelation, Component>(relations, false))
     {
         GatherComponents(componentFilter);
     }
 }
示例#5
0
 void GatherComponents <TComponentRootType>(CachedComponentFilter <ICondition, TComponentRootType> componentFilter)
     where TComponentRootType : Component
 {
     SemanticTagConditions = componentFilter.GetMatchingComponents <ISemanticTagCondition>();
     IntConditions         = componentFilter.GetMatchingComponents <ICondition <System.Int32> >();
     FloatConditions       = componentFilter.GetMatchingComponents <ICondition <System.Single> >();
     StringConditions      = componentFilter.GetMatchingComponents <ICondition <System.String> >();
     PoseConditions        = componentFilter.GetMatchingComponents <ICondition <UnityEngine.Pose> >();
     Vector2Conditions     = componentFilter.GetMatchingComponents <ICondition <UnityEngine.Vector2> >();
 }
示例#6
0
        void GatherComponents <TComponentRootType>(CachedComponentFilter <IRelation, TComponentRootType> componentFilter)
            where TComponentRootType : Component
        {
            IntRelations = componentFilter.GetMatchingComponents <IRelation <System.Int32> >();
            Count       += IntRelations.Length;

            PoseRelations = componentFilter.GetMatchingComponents <IRelation <UnityEngine.Pose> >();
            Count        += PoseRelations.Length;

            Vector2Relations = componentFilter.GetMatchingComponents <IRelation <UnityEngine.Vector2> >();
            Count           += Vector2Relations.Length;
        }