Example #1
0
 public static Type GetGroup(Background.Id id)
 {
     if (id == 0)
     {
         return(typeof(Background));
     }
     return(GetGroup((int)id));
 }
Example #2
0
 public BackgroundBlock GenerateBlock(Background.Id id)
 {
     try
     {
         return(new BackgroundBlock(id));
     }
     catch (ArgumentException ex)
     {
         throw new NotSupportedException("There is no Block assosicated with this query.", ex);
     }
 }
Example #3
0
 public IBlockQuery <Background.Id, BlocksItem> this[Background.Id id] => this.Background[id];
Example #4
0
 public BackgroundBlock(Background.Id id)
 {
     this._id = id;
 }
 public static void Place(this Blocks blocks, int x, int y, Background.Id block)
 {
     blocks.Place(x, y, new BackgroundBlock(block));
 }
 public static void Set(this IBlockSettable <ForegroundBlock, BackgroundBlock> blocks, Background.Id block)
 {
     blocks.Set(new BackgroundBlock(block));
 }
 public static void SetMany <T>(this IEnumerable <IEnumerable <T> > blocks, Background.Id block) where T : IBlockSettable <ForegroundBlock, BackgroundBlock>
 {
     blocks.SetMany(new BackgroundBlock(block));
 }
Example #8
0
 public static void Set(this IEnumerable <BlocksItem> blocks, Background.Id block)
 {
     blocks.Set(new BackgroundBlock(block));
 }
Example #9
0
 public static void Set(this BlocksItem blocks, Background.Id block)
 {
     blocks.Set(new BackgroundBlock(block));
 }
 public bool ShouldIndex(Background.Id id, BackgroundBlock?block)
 {
     return(this._innerFilter?.ShouldIndex(id, block) != false &&
            this._backgroundPredicate(id, block));
 }
Example #11
0
 public static PackAttribute GetPackage(Background.Id id)
 {
     return(GetPackageInternal((int)id));
 }
Example #12
0
 public static void  SetPackage(Background.Id id, PackAttribute package)
 {
     SetPackageInternal((int)id, package);
 }
Example #13
0
 public IBlockQuery <Background.Id, ReadOnlyWorldDictionaryItem> this[Background.Id id] => this.Background[id];
Example #14
0
 internal bool HasBlockInternal(Background.Id id)
 {
     return(this.HasPack(ItemServices.GetPackage(id)));
 }