there are two listst:
- sprites (includes its own texture) - used for eg. projectiles (flying arrow) or spot animations (fireball explosion)
- textures - used for action icons, button images, indicator images
Code: Select all
{
"sprites": [
{
"idString": "SPRITE_SPELL_SPOT_ANIM_SWORD_WHIRLWIND", - sprite name
"addRotation": 0.50f, - base rotation (eg. arrow direction) 0 means do not rotate me (so set 0.01 if you want to add 0 degree)
"onLayer": "HIGHLIGHT",
"texture": {
"imgName": "96_anim_action_sword_whirlwind.png", - image asset filename
"cropToRect": {"bottom": 20,"left": 10,"right": 20,"top": 10}, - you can cut a part of it to be the texture.
"imgColumns": 4, - 1 = single image, more: animation
"animFrameDuration":40, - animation case: the time each image is shown (milli sec) - if 0 and decor sprite than it will be calculated from the animation or attack/move and last to the end of it.
"animFrameDurations": eg: [6000,200,200,200,200,200,200,200,200,200], sets the frame duration for all frames in millisecs (if set, animFrameDuration is omitted)
"animLoopCount":0, - animation case: how amny times to play the animation (§ = loop forever)
"translateX":-20, //in case of decor animations like sword slash, move decor, you can define translation where to draw the image from the default unit tile top-left position
"translateY":-10, //in case of decor animations like sword slash, move decor, you can define translation where to draw the image from the default unit tile top-left position
"fadeOutDurationSec":0.5, //on the end of an animation (eg. attack or move decor) how much sec time to fade out eg. 0.5 sec
"withColoring": false, - if it is a "player color" relevant image
"soundPackIdString": "SOUND_PACK_WHIRLWIND_ATTACK" - in case of spot animation - this can be the sound of animation. (fireball explosion )
}
},
{
"idString": "SPRITE_ACTION_CANNONBALL", - these are the individual textures (being no sprites), the definition is exactly same as above the texture within the sprite case.
"addRotation": 0f,
"onLayer": "HIGHLIGHT",
"postAnimIdString": "SPRITE_EXPLOSION", - you can set another sprite that should be played on the end of this sprite anumation (like an explosion after the cannonball reach target)
"texture": {
"idString": "TEXTURE_ACTION_CANNONBALL",
"imgName": "32_arrow_cannon_ball.png",
"imgColumns": 1,
"withColoring": false,
"soundPackIdString": "SOUND_PACK_WHIRLWIND_ATTACK"
}
}
],
"textures": [
{
"idString": "XXTEXTURE_ACTION_CANNONBALL",
"imgColumns": 1,
"imgName": "32_arrow_cannon_ball.png",
"soundPackIdString": "SOUND_UNIT_ATTACK_CANNON",
"withColoring": false
}
]
}