public static void exports ( Xml root , CollisionCategory category ) { Check . notNull ( root ) ; Check . notNull ( category ) ; final Xml node = root . createChild ( NODE_CATEGORY ) ; node . writeString ( ATT_NAME , category . getName ( ) ) ; node . writeString ( ATT_AXIS , category . getAxis ( ) . name ( ) ) ; node . writeInteger ( ATT_X , category . getOffsetX ( ) ) ; node . writeInteger ( ATT_Y , category . getOffsetY ( ) ) ; node . writeBoolean ( ATT_GLUE , category . isGlue ( ) ) ; for ( final CollisionGroup group : category . getGroups ( ) ) { final Xml groupNode = node . createChild ( TileGroupsConfig . NODE_GROUP ) ; groupNode . setText ( group . getName ( ) ) ; } }
Export the collision category data as a node .