
Definition
First, you have to define the animation so you can use it later. Here's how to do so:
Code: Select all
[
{
"id":"$tutorial_animation00", //unique id of your animation
"type":"animation",
"frames":[{"bmp":"tutorial.png"}, {"bmp":"tutorial2.png"}],
"speed":2.5 //speed at which will the frames change, 1 is default, the higher the value, the slower it goes
}
]
Usage
Now, you need to add the actual animation to a building:
Code: Select all
[
{
... //rest of the building's code goes here ^
"animation":[
{"id":"$tutorial_animation00", //defines which animation will it use
"x":14, //position of animation on horizontal axis, x:0 is at the leftmost edge, will show the anim close to the center
"y":-3 //position on vertical axis, x:0 is on the middle of the tile, will show the anim slightly above the center
}]
}
]
