From 5fe4904030fd31f9f786e5c2595c319fa9196146 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Mon, 8 Jul 2024 21:30:24 +0200 Subject: [PATCH] fixing warnings and styles --- scripts/house_template.gd | 1 + scripts/main_level.gd | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/house_template.gd b/scripts/house_template.gd index ac49cc8..456bf50 100644 --- a/scripts/house_template.gd +++ b/scripts/house_template.gd @@ -3,6 +3,7 @@ extends Node2D const LEVEL_NAME = "house_template" + @onready var player = $Player diff --git a/scripts/main_level.gd b/scripts/main_level.gd index ba567d1..75567bb 100644 --- a/scripts/main_level.gd +++ b/scripts/main_level.gd @@ -1,5 +1,6 @@ extends Node2D + const LEVEL_NAME = "main_level" @@ -8,11 +9,11 @@ const LEVEL_NAME = "main_level" func _ready(): Globals.request_update_player_position.connect(update_player_position) - Globals.set_current_scene(Constants.LEVELS_NAMES[LEVEL_NAME]) + Globals.set_current_scene(Constants.LEVELS_NAMES[LEVEL_NAME] as Constants.LEVELS_NAMES) # get player poss player.position = Globals.get_last_player_position_in_scene(Constants.LEVELS_NAMES[LEVEL_NAME] as Constants.LEVELS_NAMES) func update_player_position(): - Globals.update_player_position(Constants.LEVELS_NAMES[LEVEL_NAME], player.position) + Globals.update_player_position(Constants.LEVELS_NAMES[LEVEL_NAME] as Constants.LEVELS_NAMES, player.position) -- 2.30.2