Add support for simple periodic sprite animations

This commit is contained in:
Matthias Schiffer 2018-11-11 00:56:22 +01:00
parent 426b2c37ff
commit b83b596b0f
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
7 changed files with 90 additions and 22 deletions

23
dist/resources/entity/square.json vendored Normal file
View file

@ -0,0 +1,23 @@
{
"sprite": "square",
"collision": [
{
"type": "polygon",
"vertices": [
[-0.46875, -0.46875],
[-0.46875, 0.46875],
[0.46875, 0.46875],
[0.46875, -0.46875]
]
}
],
"frames": 4,
"animation": {
"sequence": [
[500, 0],
[500, 1],
[500, 2],
[500, 3]
]
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 808 B

After

Width:  |  Height:  |  Size: 528 B

Before After
Before After