def setup(self):
    'Set-up the game here. Call this function to restart the game.'
    self.camera = arcade.Camera(self.width, self.height)
    self.gui_camera = arcade.Camera(self.width, self.height)
    map_name = f':resources:tiled_maps/map2_level_{self.level}.json'
    layer_options = {LAYER_NAME_PLATFORMS: {'use_spatial_hash': True}, LAYER_NAME_COINS: {'use_spatial_hash': True}, LAYER_NAME_DONT_TOUCH: {'use_spatial_hash': True}}
    self.tile_map = arcade.load_tilemap(map_name, TILE_SCALING, layer_options)
    self.scene = arcade.Scene.from_tilemap(self.tile_map)
    self.scene.add_sprite_list_after('Player', LAYER_NAME_FOREGROUND)
    image_source = ':resources:images/animated_characters/female_adventurer/femaleAdventurer_idle.png'
    self.player_sprite = Player(image_source, CHARACTER_SCALING)
    self.player_sprite.center_x = PLAYER_START_X
    self.player_sprite.center_y = PLAYER_START_Y
    self.scene.add_sprite('Player', self.player_sprite)
    self.physics_engine = arcade.PhysicsEnginePlatformer(self.player_sprite, gravity_constant=GRAVITY, walls=self.scene['Platforms'])
    self.score = 0
    self.lives_left = 5
    if self.tile_map.background_color:
        arcade.set_background_color(self.tile_map.background_color)
    self.end_of_map = (self.tile_map.width * GRID_PIXEL_SIZE)
Set-up the game here. Call this function to restart the game.
def setup(self):
    
    self.camera = arcade.Camera(self.width, self.height)
    self.gui_camera = arcade.Camera(self.width, self.height)
    map_name = f':resources:tiled_maps/map2_level_{self.level}.json'
    layer_options = {LAYER_NAME_PLATFORMS: {'use_spatial_hash': True}, LAYER_NAME_COINS: {'use_spatial_hash': True}, LAYER_NAME_DONT_TOUCH: {'use_spatial_hash': True}}
    self.tile_map = arcade.load_tilemap(map_name, TILE_SCALING, layer_options)
    self.scene = arcade.Scene.from_tilemap(self.tile_map)
    self.scene.add_sprite_list_after('Player', LAYER_NAME_FOREGROUND)
    image_source = ':resources:images/animated_characters/female_adventurer/femaleAdventurer_idle.png'
    self.player_sprite = Player(image_source, CHARACTER_SCALING)
    self.player_sprite.center_x = PLAYER_START_X
    self.player_sprite.center_y = PLAYER_START_Y
    self.scene.add_sprite('Player', self.player_sprite)
    self.physics_engine = arcade.PhysicsEnginePlatformer(self.player_sprite, gravity_constant=GRAVITY, walls=self.scene['Platforms'])
    self.score = 0
    self.lives_left = 5
    if self.tile_map.background_color:
        arcade.set_background_color(self.tile_map.background_color)
    self.end_of_map = (self.tile_map.width * GRID_PIXEL_SIZE)