Ejemplo n.º 1
0
 public bool AutotileWith(int selfBrushId, int otherBrushId)
 {
     if (
         ((AutotilingMode & eAutotilingMode.Self) != 0 && selfBrushId == otherBrushId) ||
         ((AutotilingMode & eAutotilingMode.Other) != 0 && otherBrushId != selfBrushId && otherBrushId != (Tileset.k_TileDataMask_BrushId >> 16))
         )
     {
         return(true);
     }
     if ((AutotilingMode & eAutotilingMode.Group) != 0)
     {
         TilesetBrush brush = Tileset.FindBrush(otherBrushId);
         if (brush)
         {
             return(Tileset.GetGroupAutotiling(Group, brush.Group));
         }
         else if (otherBrushId == Tileset.k_BrushId_Default)
         {
             return(Tileset.GetGroupAutotiling(Group, 0)); //with normal tiles, use default group (0) //TODO: this is old code, now it is possible to change tile group. Check if this method is useful after removing it from TilemapChunk
         }
     }
     return(false);
 }
Ejemplo n.º 2
0
 public bool AutotileWith(int selfBrushId, int otherBrushId)
 {
     if (
         ((AutotilingMode & eAutotilingMode.Self) != 0 && selfBrushId == otherBrushId) ||
         ((AutotilingMode & eAutotilingMode.Other) != 0 && otherBrushId != selfBrushId && otherBrushId != (Tileset.k_TileDataMask_BrushId >> 16))
         )
     {
         return(true);
     }
     if ((AutotilingMode & eAutotilingMode.Group) != 0)
     {
         TilesetBrush brush = Tileset.FindBrush(otherBrushId);
         if (brush)
         {
             return(Tileset.GetGroupAutotiling(Group, brush.Group));
         }
         else if (otherBrushId == Tileset.k_BrushId_Default)
         {
             return(Tileset.GetGroupAutotiling(Group, 0)); //with normal tiles, use default group (0)
         }
     }
     return(false);
 }
Ejemplo n.º 3
0
        private bool GetAutotiling(int groupA, int groupB)
        {
            Tileset tileset = (Tileset)target;

            return(tileset.GetGroupAutotiling(groupA, groupB));
        }