Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
You can grab pre-release versions from PyPi. See the available versions from the
Arcade [PyPi Release History](https://pypi.org/project/arcade/#history) page.

## Unreleased

### Breaking Change
- Tilemap: Sprites of an object tile layer will now apply visibility of the object.

## 4.0.0.dev3

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion arcade/resources/assets/tiled_maps/test_objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
"name":"crate1",
"rotation":-45,
"type":"crate",
"visible":true,
"visible":false,
"width":400,
"x":1500,
"y":1800
Expand Down
1 change: 1 addition & 0 deletions arcade/tilemap/tilemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@ def _process_object_layer(

my_sprite.position = (x + rotated_center_x, y + rotated_center_y)
my_sprite.angle = angle_degrees
my_sprite.visible = cur_object.visible

if layer.tint_color:
my_sprite.color = ArcadeColor.from_iterable(layer.tint_color)
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/tilemap/test_tilemap_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ def test_one():
sprite_1 = tile_list[0]
assert sprite_1 is not None
#
# Test width, height and angle
# Test width, height, angle and visibility
#
assert sprite_1.width == 400
assert sprite_1.height == 1000
assert sprite_1.angle == -45
assert sprite_1.visible == False

#
# Test type and name properties
Expand Down
Loading