diff --git a/Scene/MaiEE0A.tmp b/Scene/MaiEE0A.tmp deleted file mode 100644 index bcc8799..0000000 --- a/Scene/MaiEE0A.tmp +++ /dev/null @@ -1,13 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://bvunk8qf230h4"] - -[ext_resource type="PackedScene" uid="uid://bvtebeu1wy2ak" path="res://Scene/player.tscn" id="1_kveqs"] - -[node name="MainScene" type="Node2D"] -position = Vector2(49, 153) - -[node name="Area2D" type="Area2D" parent="."] - -[node name="Player" parent="." instance=ExtResource("1_kveqs")] -position = Vector2(111, -23) - -[connection signal="area_exited" from="Area2D" to="Player" method="_on_area_2d_area_exited"] diff --git a/Scene/MainScene.tscn b/Scene/MainScene.tscn deleted file mode 100644 index a057aad..0000000 --- a/Scene/MainScene.tscn +++ /dev/null @@ -1,20 +0,0 @@ -[gd_scene load_steps=3 format=3 uid="uid://bvunk8qf230h4"] - -[ext_resource type="PackedScene" uid="uid://bvtebeu1wy2ak" path="res://Scene/player.tscn" id="1_kveqs"] - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_gom25"] -size = Vector2(1156, 647) - -[node name="MainScene" type="Node2D"] -position = Vector2(49, 153) - -[node name="Area2D" type="Area2D" parent="."] - -[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] -position = Vector2(527, 168.5) -shape = SubResource("RectangleShape2D_gom25") - -[node name="Player" parent="." instance=ExtResource("1_kveqs")] -position = Vector2(111, -23) - -[connection signal="body_exited" from="Area2D" to="Player" method="_on_area_2d_body_exited"] diff --git a/Scene/player.tscn b/Scene/player.tscn deleted file mode 100644 index bc6703a..0000000 --- a/Scene/player.tscn +++ /dev/null @@ -1,17 +0,0 @@ -[gd_scene load_steps=4 format=3 uid="uid://bvtebeu1wy2ak"] - -[ext_resource type="Script" path="res://Scene/player.gd" id="1_4giad"] -[ext_resource type="Texture2D" uid="uid://b4viqupj5q0je" path="res://ressources/images/icon.svg" id="1_p44a3"] - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_mgmcf"] -size = Vector2(119, 116) - -[node name="Player" type="CharacterBody2D"] -script = ExtResource("1_4giad") - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2(-0.5, 1) -shape = SubResource("RectangleShape2D_mgmcf") - -[node name="Sprite2D" type="Sprite2D" parent="."] -texture = ExtResource("1_p44a3") diff --git a/project.godot b/project.godot index 98b44b9..0f99fdf 100644 --- a/project.godot +++ b/project.godot @@ -11,10 +11,16 @@ config_version=5 [application] config/name="code-game-jam-drop-plafond-2025" -run/main_scene="res://Scene/MainScene.tscn" +run/main_scene="res://scenes/Room.tscn" config/features=PackedStringArray("4.3", "GL Compatibility") config/icon="res://ressources/images/icon.svg" +[display] + +window/size/viewport_width=1280 +window/size/viewport_height=720 +window/stretch/mode="canvas_items" + [dotnet] project/assembly_name="code-game-jam-drop-plafond-2025" @@ -23,22 +29,22 @@ project/assembly_name="code-game-jam-drop-plafond-2025" BOUGER_HAUT={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":122,"location":0,"echo":false,"script":null) ] } BOUGER_BAS={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) ] } BOUGER_DROITE={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) ] } BOUGER_GAUCHE={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) ] } PAUSE={ diff --git a/scenes/Room.tscn b/scenes/Room.tscn new file mode 100644 index 0000000..4f7d197 --- /dev/null +++ b/scenes/Room.tscn @@ -0,0 +1,31 @@ +[gd_scene load_steps=3 format=3 uid="uid://durhes43gex7a"] + +[ext_resource type="PackedScene" uid="uid://c7bfiw54rvaq2" path="res://scenes/player_melodie.tscn" id="1_cl1wt"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_18mp2"] +size = Vector2(1280, 720) + +[node name="Room" type="Node2D"] + +[node name="Player_Melodie" parent="." instance=ExtResource("1_cl1wt")] +position = Vector2(0, -9) + +[node name="Camera2D" type="Camera2D" parent="."] + +[node name="StaticBody2D" type="StaticBody2D" parent="."] + +[node name="Bottom Wall" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(3, 721) +shape = SubResource("RectangleShape2D_18mp2") + +[node name="Top Wall" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(0, -719) +shape = SubResource("RectangleShape2D_18mp2") + +[node name="Left Wall" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(-1278, -2) +shape = SubResource("RectangleShape2D_18mp2") + +[node name="Right Wall" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(1280, -4) +shape = SubResource("RectangleShape2D_18mp2") diff --git a/scenes/player_melodie.tscn b/scenes/player_melodie.tscn new file mode 100644 index 0000000..2ee8b9b --- /dev/null +++ b/scenes/player_melodie.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=4 format=3 uid="uid://c7bfiw54rvaq2"] + +[ext_resource type="Script" path="res://scripts/player_control.gd" id="1_7sg4g"] +[ext_resource type="Texture2D" uid="uid://b4viqupj5q0je" path="res://ressources/images/icon.svg" id="1_w50ia"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_trcma"] +size = Vector2(122, 128) + +[node name="Player_Melodie" type="CharacterBody2D"] +script = ExtResource("1_7sg4g") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("1_w50ia") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(-1, 0) +shape = SubResource("RectangleShape2D_trcma") diff --git a/Scene/player.gd b/scripts/player_control.gd similarity index 73% rename from Scene/player.gd rename to scripts/player_control.gd index d076fbe..3c0513a 100644 --- a/Scene/player.gd +++ b/scripts/player_control.gd @@ -1,8 +1,6 @@ extends CharacterBody2D - -const move_speed = 100.0 - +const move_speed = 400 func _physics_process(delta: float) -> void: move_and_slide() @@ -14,8 +12,4 @@ func _process(delta: float) -> void: velocity = direction * move_speed - - -func _on_area_2d_body_exited(body: CharacterBody2D) -> void: - print(body) - print("Le joueur essaie de quitter la zone !") + pass