public static bool IsObtainable(this GroundTileType type) => ((0b_1_10000000_00010110_10110111 >> (int)type) & 1) == 1;
private void SetTile(int x, int y, GroundTileType type, ObjectTileType obj) { if (x >= 0 && y >= 0 && x < _width && y < _height) { int X = x / SUB_WIDTH; int Y = y / SUB_HEIGHT; _subworlds[X, Y].WorldTiles[x - X * SUB_WIDTH, y - Y * SUB_HEIGHT] = new WorldTile(type, obj); } }
public GroundTile(GroundTileType type) { _type = type; }
public static bool Contains(this GroundTilePermission g1, GroundTileType g2) => (g1 & (GroundTilePermission)(1 << (int)g2)) != 0;
private bool hasAdjTileOfType(int x, int y, GroundTileType type) { if (GetGround(x + 1, y) == type) return true; if (GetGround(x - 1, y) == type) return true; if (GetGround(x, y + 1) == type) return true; if (GetGround(x, y - 1) == type) return true; return false; }
public static bool Contains(this GroundTileAllowed g1, GroundTileType g2) => (g1 & (GroundTileAllowed)(1 << (int)g2)) != 0;
public WorldTile(GroundTileType ground) { Ground = ground; Object = ObjectTileType.None; }
public WorldTile(GroundTileType ground, ObjectTileType obj) { Ground = ground; Object = obj; }
public GroundTile(GroundTileType tileType) { _tileType = tileType; }