Enum TiledFlag

Flags set by Tiled in the guid field. Used to indicate mirroring and rotation.

The enum base type is uint .

Enum members

Name Description
all bitwise or of all tile flags.
flipDiagonal Tile is flipped diagonally
flipHorizontal Tile is flipped horizontally (over y axis)
flipVertical Tile is flipped vertically (over x axis)
none Tile is not flipped

Example

// this is the GID for a tile with tileset index 21 that was flipped horizontally
TiledGid gid = 2147483669;
// clearing the flip flags yields a gid that should map to a tileset index
assert((gid & ~TiledFlag.all) == 21);
// it is flipped horizontally
assert(gid & TiledFlag.flipHorizontal);
assert(!(gid & TiledFlag.flipVertical));
assert(!(gid & TiledFlag.flipDiagonal));

Authors

rcorre

Copyright

Copyright © 2015, Ryan Roden-Corrent

License

MIT