diff --git a/UI/menu.tscn b/UI/menu.tscn index b4bb192..be1ba60 100644 --- a/UI/menu.tscn +++ b/UI/menu.tscn @@ -1,10 +1,13 @@ -[gd_scene load_steps=8 format=3 uid="uid://44wla7mlivqm"] +[gd_scene load_steps=9 format=3 uid="uid://44wla7mlivqm"] [ext_resource type="Script" path="res://UI/menu.gd" id="1_30mo7"] [ext_resource type="FontFile" uid="uid://c1lnxul6k2adw" path="res://assest/font/vhs-gothic.ttf" id="2_6inip"] [ext_resource type="Theme" uid="uid://bn1flbuijm27d" path="res://UI/menu_button.tres" id="3_feq31"] [ext_resource type="AudioStream" uid="uid://dcp8rqog22cbk" path="res://assest/music/chaussette.ogg" id="4_0n4j1"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_46msp"] +bg_color = Color(0.615845, 0.268767, 0.406544, 1) + [sub_resource type="LabelSettings" id="LabelSettings_q3w7i"] line_spacing = 45.0 font = ExtResource("2_6inip") @@ -36,11 +39,13 @@ grow_vertical = 2 [node name="Panel" type="Panel" parent="MarginContainer"] layout_mode = 2 size_flags_stretch_ratio = 1.37 +theme_override_styles/panel = SubResource("StyleBoxFlat_46msp") [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/Panel"] layout_mode = 2 offset_right = 1920.0 offset_bottom = 1080.0 +theme_override_constants/separation = 10 [node name="Label" type="Label" parent="MarginContainer/Panel/VBoxContainer"] layout_mode = 2 @@ -52,9 +57,6 @@ label_settings = SubResource("LabelSettings_q3w7i") horizontal_alignment = 1 vertical_alignment = 1 -[node name="HSeparator" type="HSeparator" parent="MarginContainer/Panel/VBoxContainer"] -layout_mode = 2 - [node name="Start" type="Button" parent="MarginContainer/Panel/VBoxContainer"] layout_mode = 2 theme = ExtResource("3_feq31") @@ -93,6 +95,7 @@ offset_left = 100.0 offset_top = 681.0 offset_right = 1841.0 offset_bottom = 1011.0 +theme_override_constants/separation = 10 [node name="Label" type="Label" parent="MarginContainer/Panel/VBoxContainer2"] layout_mode = 2 diff --git a/caracters/player/player_controler.gd b/caracters/player/player_controler.gd index c01a092..9ada895 100644 --- a/caracters/player/player_controler.gd +++ b/caracters/player/player_controler.gd @@ -9,6 +9,18 @@ extends Node2D # press grab var can_interact_with : Node2D +@onready var cam := $"../Camera2D" as Camera2D + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + var limits:Rect2 = world.get_used_rect() + var top_left_global = world.to_global(world.map_to_local(limits.position)) + var bottom_right_global = world.to_global(world.map_to_local(limits.end)) + cam.limit_left = top_left_global.x + 48 + cam.limit_top = top_left_global.y - 24 + cam.limit_right = bottom_right_global.x + 48 + cam.limit_bottom = bottom_right_global.y - 24 + func _unhandled_input(event: InputEvent) -> void: print(human.get_feet_global_position()) human.stop_interaction() diff --git a/vehicules/car.tscn b/vehicules/car.tscn index 43d10b5..1189982 100644 --- a/vehicules/car.tscn +++ b/vehicules/car.tscn @@ -607,6 +607,7 @@ stream = ExtResource("4_o8ske") volume_db = -4.687 autoplay = true attenuation = 2.0 +bus = &"Fx" playback_type = 1 [connection signal="finished" from="AudioStreamPlayer2D" to="." method="_on_audio_stream_player_2d_finished"]