Ejemplo n.º 1
0
 public OSFilterAttribute(FilterActions action, PlatformID osType, FilterRules rule, string osVersion)
 {
     Action = action;
     OSType = osType;
     Rule = rule;
     Version = osVersion;
 }
Ejemplo n.º 2
0
    protected void Awake()
    {
        FilterRules weaponHolderFilterRules = FilterRulesBuilder.SetupHasTagBuilder("WeaponDisplay")
                                              .AddHasComponentRule <Weapon>(true).Result();

        _weaponHolderFilter = EntityFilter.Create(weaponHolderFilterRules, OnEntityTracked, OnEntityUntracked);
    }
Ejemplo n.º 3
0
    protected void Awake()
    {
        FilterRules playerFilterRules = FilterRulesBuilder.SetupHasTagBuilder("Player")
                                        .AddHasComponentRule <PlatformerMov2D>(true)
                                        .AddHasComponentRule <Weapon>(true)
                                        .Result();

        _playerControllerFilter = EntityFilter.Create(playerFilterRules, null, null);
    }
Ejemplo n.º 4
0
    protected override void Awake()
    {
        base.Awake();

        _health = gameObject.GetComponent <Health>();

        FilterRules waypointsFilterRules = FilterRulesBuilder.SetupNoTagsBuilder()
                                           .AddHasComponentRule <AIPath>(true).Result();

        _waypointsFilter = EntityFilter.Create(waypointsFilterRules, null, null);
    }
Ejemplo n.º 5
0
        public static ColumnSchemaCollection Filter(this ColumnSchemaCollection columns, FilterRules rules, FilterDirection direction)
        {
            var matches = (from column in columns
                            where !column.IsPrimaryKeyMember || !rules.HasFlag(FilterRules.IsPrimaryKey)
                            where !column.IsIdentityColumn() || !rules.HasFlag(FilterRules.IsIdentity)
                            where !column.IsIdentifierColumn() || !rules.HasFlag(FilterRules.IsIdentifier)
                            where !column.IsDeleteFlag() || !rules.HasFlag(FilterRules.IsDeleteFlag)
                            where !column.IsVersionDateColumn() || !rules.HasFlag(FilterRules.IsDeleteFlag)
                            where !column.IsVersionUserColumn() || !rules.HasFlag(FilterRules.IsVersionUser)
                            where !column.HasDefaultValue() || !rules.HasFlag(FilterRules.HasDefaultValue)
                            select column).ToList();

            return (direction == FilterDirection.Include)
                ? matches.ToColumnSchemaCollection()
                : columns.Where(column => !matches.Contains(column)).ToList().ToColumnSchemaCollection();
        }
Ejemplo n.º 6
0
        public static ColumnSchemaCollection Filter(this ColumnSchemaCollection columns, FilterRules rules, FilterDirection direction)
        {
            var matches = (from column in columns
                           where !column.IsPrimaryKeyMember || !rules.HasFlag(FilterRules.IsPrimaryKey)
                           where !column.IsIdentityColumn() || !rules.HasFlag(FilterRules.IsIdentity)
                           where !column.IsIdentifierColumn() || !rules.HasFlag(FilterRules.IsIdentifier)
                           where !column.IsDeleteFlag() || !rules.HasFlag(FilterRules.IsDeleteFlag)
                           where !column.IsVersionDateColumn() || !rules.HasFlag(FilterRules.IsDeleteFlag)
                           where !column.IsVersionUserColumn() || !rules.HasFlag(FilterRules.IsVersionUser)
                           where !column.HasDefaultValue() || !rules.HasFlag(FilterRules.HasDefaultValue)
                           select column).ToList();

            return((direction == FilterDirection.Include)
                ? matches.ToColumnSchemaCollection()
                : columns.Where(column => !matches.Contains(column)).ToList().ToColumnSchemaCollection());
        }
Ejemplo n.º 7
0
 public void AddRule(FilterRule rule)
 {
     FilterRules.Add(rule);
 }