Implement more flexible handling of entities and collidables

This commit is contained in:
Matthias Schiffer 2018-11-08 22:03:08 +01:00
parent 40339947d1
commit 5eae6f29a8
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
11 changed files with 204 additions and 73 deletions

View file

@ -0,0 +1,3 @@
{
"sprite": "green_circle"
}

14
dist/resources/entity/red_circle.json vendored Normal file
View file

@ -0,0 +1,14 @@
{
"sprite": "red_circle",
"collision": [
{
"type": "polygon",
"vertices": [
[-0.5, -0.5],
[-0.5, 0.5],
[0.5, 0.5],
[0.5, -0.5]
]
}
]
}

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB