diff --git a/Nodes/UI.tscn b/Nodes/UI.tscn index 7cfa8a7..58b3353 100644 --- a/Nodes/UI.tscn +++ b/Nodes/UI.tscn @@ -5,7 +5,7 @@ [ext_resource type="Texture2D" uid="uid://44lfs83sax35" path="res://undefined - Imgur.png" id="2_udann"] [ext_resource type="Texture2D" uid="uid://cxfybbp5idjwg" path="res://o_idle1.png" id="3_segqn"] [ext_resource type="PackedScene" uid="uid://dgr3cta6n1tg3" path="res://menu/stats_player_1.tscn" id="3_yhsvf"] -[ext_resource type="PackedScene" uid="uid://d3cmkdvgaiypf" path="res://menu/stats_player_2.tscn" id="4_c4m18"] +[ext_resource type="PackedScene" path="res://menu/stats_player_2.tscn" id="4_c4m18"] [ext_resource type="Texture2D" uid="uid://dsphpbpt27t1i" path="res://a3TCqhg.png" id="4_uiyin"] [sub_resource type="StyleBoxTexture" id="StyleBoxTexture_fir3c"] diff --git a/Nodes/game.tscn b/Nodes/game.tscn index 16b0fe0..a4423ec 100644 --- a/Nodes/game.tscn +++ b/Nodes/game.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=10 format=3 uid="uid://b8u4bo4mklj55"] [ext_resource type="Script" path="res://scripts/Logic/Game.gd" id="1_dubwq"] -[ext_resource type="PackedScene" uid="uid://nxapkgcq2c70" path="res://Nodes/light_setup.tscn" id="2_1lh4t"] +[ext_resource type="PackedScene" path="res://Nodes/light_setup.tscn" id="2_1lh4t"] [ext_resource type="PackedScene" uid="uid://bqe8ucbruto1j" path="res://Nodes/StartNode.tscn" id="3_xcgy2"] [ext_resource type="PackedScene" uid="uid://md2ofbviios3" path="res://Nodes/Train_P1.tscn" id="4_gg4ea"] [ext_resource type="PackedScene" uid="uid://bikdn7ep2vpxw" path="res://Nodes/Train_P2.tscn" id="5_wi6pu"] diff --git a/scripts/Logic/Game.gd b/scripts/Logic/Game.gd index 619c1a3..98d70fb 100644 --- a/scripts/Logic/Game.gd +++ b/scripts/Logic/Game.gd @@ -55,11 +55,13 @@ func getMapSize(node, is_start): active_map_nodes += 1 func _on_player_game_over(): - $Control/GameOver.visible = true p1_train.current_speed = 0 p2_train.current_speed = 0 p1_train.visible = false p2_train.visible = false + for child in $Control.get_children(): + child.hide() + $Control/GameOver.visible = true func _on_turn_event(): #