'How to get particular part of image using json? java android
I am new to Java android game development and I am learning it from past few days, so to learn it i used github scripts to understand how an java game project work than i went to this image which is in res directory: Elements of the game
and this json file with same name as image only diffrence is extension:
"frames": {
"bg_shadow.png": {
"frame": {
"x": 792,
"y": 712,
"w": 60,
"h": 60
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 60,
"h": 60
},
"sourceSize": {
"w": 60,
"h": 60
}
},
"button_black.png": {
"frame": {
"x": 398,
"y": 730,
"w": 146,
"h": 44
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 146,
"h": 44
},
"sourceSize": {
"w": 146,
"h": 44
}
},
"button_gold.png": {
"frame": {
"x": 611,
"y": 345,
"w": 146,
"h": 44
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 146,
"h": 44
},
"sourceSize": {
"w": 146,
"h": 44
}
},
by opening this json file i understood they are the coordinate of the image with height and width.
I just want to know any way to change the icons from image and any suggested tutorials for this
Thanks in advance
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
