@@ -108,7 +108,7 @@ class TileMap:
108
108
:param Union[str, Path] map_file: A JSON map file for a Tiled map to initialize from
109
109
:param float scaling: Global scaling to apply to all Sprites.
110
110
:param Dict[str, Dict[str, Any]] layer_options: Extra parameters for each layer.
111
- :param Optional[ bool] use_spatial_hash: If set to True, this will make moving a sprite
111
+ :param bool use_spatial_hash: If set to True, this will make moving a sprite
112
112
in the SpriteList slower, but it will speed up collision detection
113
113
with items in the SpriteList. Great for doing collision detection
114
114
with static walls/platforms.
@@ -179,7 +179,7 @@ def __init__(
179
179
map_file : Union [str , Path ] = "" ,
180
180
scaling : float = 1.0 ,
181
181
layer_options : Optional [Dict [str , Dict [str , Any ]]] = None ,
182
- use_spatial_hash : Optional [ bool ] = None ,
182
+ use_spatial_hash : bool = False ,
183
183
hit_box_algorithm : Optional [HitBoxAlgorithm ] = None ,
184
184
tiled_map : Optional [pytiled_parser .TiledMap ] = None ,
185
185
offset : Vec2 = Vec2 (0 , 0 ),
@@ -626,7 +626,7 @@ def _process_image_layer(
626
626
layer : pytiled_parser .ImageLayer ,
627
627
texture_atlas : "TextureAtlas" ,
628
628
scaling : float = 1.0 ,
629
- use_spatial_hash : Optional [ bool ] = None ,
629
+ use_spatial_hash : bool = False ,
630
630
hit_box_algorithm : Optional [HitBoxAlgorithm ] = None ,
631
631
offset : Vec2 = Vec2 (0 , 0 ),
632
632
custom_class : Optional [type ] = None ,
@@ -717,7 +717,7 @@ def _process_tile_layer(
717
717
layer : pytiled_parser .TileLayer ,
718
718
texture_atlas : "TextureAtlas" ,
719
719
scaling : float = 1.0 ,
720
- use_spatial_hash : Optional [ bool ] = None ,
720
+ use_spatial_hash : bool = False ,
721
721
hit_box_algorithm : Optional [HitBoxAlgorithm ] = None ,
722
722
offset : Vec2 = Vec2 (0 , 0 ),
723
723
custom_class : Optional [type ] = None ,
@@ -792,7 +792,7 @@ def _process_object_layer(
792
792
layer : pytiled_parser .ObjectLayer ,
793
793
texture_atlas : "TextureAtlas" ,
794
794
scaling : float = 1.0 ,
795
- use_spatial_hash : Optional [ bool ] = None ,
795
+ use_spatial_hash : bool = False ,
796
796
hit_box_algorithm : Optional [HitBoxAlgorithm ] = None ,
797
797
offset : Vec2 = Vec2 (0 , 0 ),
798
798
custom_class : Optional [type ] = None ,
@@ -984,7 +984,7 @@ def load_tilemap(
984
984
map_file : Union [str , Path ],
985
985
scaling : float = 1.0 ,
986
986
layer_options : Optional [Dict [str , Dict [str , Any ]]] = None ,
987
- use_spatial_hash : Optional [ bool ] = None ,
987
+ use_spatial_hash : bool = False ,
988
988
hit_box_algorithm : Optional [HitBoxAlgorithm ] = None ,
989
989
offset : Vec2 = Vec2 (0 , 0 ),
990
990
texture_atlas : Optional ["TextureAtlas" ] = None ,
@@ -1001,7 +1001,7 @@ def load_tilemap(
1001
1001
1002
1002
:param Union[str, Path] map_file: The JSON map file.
1003
1003
:param float scaling: The global scaling to apply to all Sprite's within the map.
1004
- :param Optional[ bool] use_spatial_hash: If set to True, this will make moving a sprite
1004
+ :param bool use_spatial_hash: If set to True, this will make moving a sprite
1005
1005
in the SpriteList slower, but it will speed up collision detection
1006
1006
with items in the SpriteList. Great for doing collision detection
1007
1007
with static walls/platforms.
0 commit comments