Added atlas support. RegionAttachment code is from ajhager/eng/spine