Read collision barriers from map file
This commit is contained in:
parent
5593bf2d36
commit
9be9f8e739
4 changed files with 64 additions and 29 deletions
23
dist/resources/map/test.json
vendored
23
dist/resources/map/test.json
vendored
|
@ -46,5 +46,28 @@
|
|||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
]
|
||||
],
|
||||
"collision": [
|
||||
{
|
||||
"type": "polygon",
|
||||
"vertices": [
|
||||
[1, 1],
|
||||
[11, 1],
|
||||
[11, 5],
|
||||
[12, 5],
|
||||
[12, 7],
|
||||
[11, 7],
|
||||
[11, 11],
|
||||
[7, 11],
|
||||
[7, 12],
|
||||
[5, 12],
|
||||
[5, 11],
|
||||
[1, 11],
|
||||
[1, 7],
|
||||
[0, 7],
|
||||
[0, 5],
|
||||
[1, 5]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Reference in a new issue