gorgonDart
gorgonDart copied to clipboard
Sprite field in Map should be restructured
Sprite HashMap should be remade to me more simple and dynamic.
instead of
{
"image": "image-source", xoffset: 10, yoffset: 20
}
to
{
"src": "image-source", "xoffset": 10, "yoffset": 20, "x": 5, "y":5, "width": 30, "height": 30
}
this accepting the same syntax for normal sprites and sprites in a spritesheet.
maybe use:
{
"spritepack": {
"version": 0.1,
"imageSrc": "global-image-source.png",
"groups": {
"group-0":{
"imageSrc": "group-image.png", // if this field is omitted then it will use the spritepack image-uri
"frames":[
{
"imageSrc": "image-source", // if this field is omitted then it will use the groups image-uri
"xoffset": 10,
"yoffset": 20,
"x": 5,
"y":5,
"width": 30,
"height": 30
}
]
}
}
}
}