Status: Accepted
Owner:
ccan...@gmail.com
New issue 197 by
ccan...@gmail.com: platformer-map.xml uses inconsistent
type for collision properties
http://code.google.com/p/los-cocos/issues/detail?id=197
tiles.RectMapCollider.do_collision docstring specifies
The RectCell must have the boolean properties "top", "left",
"bottom" and "right" for those sides which the rect should collide.
tiles.RectCell docstrings tells
The cell may have the standard properties "top", "left", "bottom" and
"right" which are booleans indicating that those sides are impassable.
These are used by RectCellCollider.
The code is consistent with collision properties being booleans, but:
- The example platformer-map.xml specifies them in the style
<tile id="b1"><image ref="i-b1" />
<property name="top" value="yes" />
</tile>
- Theres no special conversion at load
- So the properties end being strings.
The correct way to specify the collision props is using type="bool" and
value="True" (or "False") , like in
<tile id="b1"><image ref="i-b1" />
<property name="top" type="bool" value="True" />
</tile>
Attached a script to dump properties for maps loaded with the xml loader.
Does all layers and marks which properties appear by way of
cell.tiles.properties
Attachments:
test_RectMapLayer_dump_cell_properties.py 1.2 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings