diff --git a/default_env.tres b/default_env.tres new file mode 100644 index 0000000..20207a4 --- /dev/null +++ b/default_env.tres @@ -0,0 +1,7 @@ +[gd_resource type="Environment" load_steps=2 format=2] + +[sub_resource type="ProceduralSky" id=1] + +[resource] +background_mode = 2 +background_sky = SubResource( 1 ) diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..32361af --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,101 @@ +[preset.0] + +name="Windows" +platform="Windows Desktop" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="C:/Users/anri/Desktop/WINDOWS/Jeu Godot.exe" +patch_list=PoolStringArray( ) +script_export_mode=1 +script_encryption_key="" + +[preset.0.options] + +texture_format/bptc=false +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +texture_format/no_bptc_fallbacks=true +binary_format/64_bits=true +binary_format/embed_pck=true +custom_template/release="" +custom_template/debug="" +codesign/enable=false +codesign/identity_type=0 +codesign/identity="" +codesign/password="" +codesign/timestamp=true +codesign/timestamp_server_url="" +codesign/digest_algorithm=1 +codesign/description="" +codesign/custom_options=PoolStringArray( ) +application/icon="" +application/file_version="" +application/product_version="" +application/company_name="Anri Kennel" +application/product_name="Jeu Godot" +application/file_description="Jeu fait par Anri K." +application/copyright="" +application/trademarks="" + +[preset.1] + +name="Linux" +platform="Linux/X11" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="C:/Users/anri/Desktop/LINUX/Jeu Godot.x86_64" +patch_list=PoolStringArray( ) +script_export_mode=1 +script_encryption_key="" + +[preset.1.options] + +texture_format/bptc=false +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +texture_format/no_bptc_fallbacks=true +binary_format/64_bits=true +binary_format/embed_pck=true +custom_template/release="" +custom_template/debug="" + +[preset.2] + +name="Mac OSX" +platform="Mac OSX" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="C:/Users/anri/Desktop/MACOSX/jeu Godot.zip" +patch_list=PoolStringArray( ) +script_export_mode=1 +script_encryption_key="" + +[preset.2.options] + +custom_template/debug="" +custom_template/release="" +application/name="Jeu Godot" +application/info="Jeu Godot par Anri Kennel" +application/icon="" +application/identifier="com.akennel.jeuGodot" +application/signature="" +application/short_version="1.0" +application/version="1.0" +application/copyright="" +display/high_res=true +privacy/camera_usage_description="" +privacy/microphone_usage_description="" +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..0b4d74e --- /dev/null +++ b/icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c160bfdb8d0423b958083202dc7b58d499cbef22f28d2a58626884378ce9b7f +size 3305 diff --git a/images/Batiment.png b/images/Batiment.png new file mode 100644 index 0000000..5325ee6 --- /dev/null +++ b/images/Batiment.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:808ba33e0f18992d300428b48cbad5e268dd7e5cf1d6f4d6a2ab47c35fb4dff1 +size 550 diff --git a/images/Fond.png b/images/Fond.png new file mode 100644 index 0000000..93a1f7c --- /dev/null +++ b/images/Fond.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ec58ed9c0d73f8a65eef5e1c9fe477dd3c6d7fafae201e46cf2b48d3931cc07 +size 12691 diff --git a/images/Lumière.png b/images/Lumière.png new file mode 100644 index 0000000..ba39c83 --- /dev/null +++ b/images/Lumière.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc5d5201fce089524e6fc03d5a85f91d1670791ffd37810f5e6b1c127ad22e0e +size 228245 diff --git a/images/balle.png b/images/balle.png new file mode 100644 index 0000000..e1f1f3b --- /dev/null +++ b/images/balle.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:faa2e234dab48a9b8ca8f2b74a16917def445a00b453288187c88c9766d7b025 +size 600 diff --git a/images/joueur.png b/images/joueur.png new file mode 100644 index 0000000..bcc3ac6 --- /dev/null +++ b/images/joueur.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afc6fc7e7c8e6e74c8da665100c2017c282b50fba602d065f868d028aaf41037 +size 654 diff --git a/images/mechant.png b/images/mechant.png new file mode 100644 index 0000000..2f08ee7 --- /dev/null +++ b/images/mechant.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68dad67c6bc2703f5979ad0b5e63919a707767502319701ab760fdf212a6b611 +size 622 diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..67d7c50 --- /dev/null +++ b/project.godot @@ -0,0 +1,56 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=4 + +_global_script_classes=[ ] +_global_script_class_icons={ + +} + +[application] + +config/name="Jeu Godot" +run/main_scene="res://scenes/Monde.tscn" +config/icon="res://icon.png" + +[input] + +haut={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) + ] +} +bas={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null) + ] +} +droite={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) + ] +} +gauche={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":81,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) + ] +} +clicGauche={ +"deadzone": 0.5, +"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null) + ] +} + +[rendering] + +environment/default_environment="res://default_env.tres" diff --git a/scenes/Balle.tscn b/scenes/Balle.tscn new file mode 100644 index 0000000..70db48d --- /dev/null +++ b/scenes/Balle.tscn @@ -0,0 +1,23 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://images/balle.png" type="Texture" id=1] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 2, 0.5 ) + +[node name="Balle" type="RigidBody2D"] + +[node name="CollisionShape2D_devant" type="CollisionShape2D" parent="."] +position = Vector2( -2, 0 ) +shape = SubResource( 1 ) + +[node name="CollisionShape2D_haut" type="CollisionShape2D" parent="."] +position = Vector2( 2, -1 ) +shape = SubResource( 1 ) + +[node name="CollisionShape2D_bas" type="CollisionShape2D" parent="."] +position = Vector2( 2, 1 ) +shape = SubResource( 1 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) diff --git a/scenes/Ennemi.tscn b/scenes/Ennemi.tscn new file mode 100644 index 0000000..9440357 --- /dev/null +++ b/scenes/Ennemi.tscn @@ -0,0 +1,25 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://images/mechant.png" type="Texture" id=1] +[ext_resource path="res://scripts/Ennemi.gd" type="Script" id=2] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 6.5, 6.5 ) + +[sub_resource type="RectangleShape2D" id=2] +extents = Vector2( 7, 7 ) + +[node name="Ennemi" type="KinematicBody2D"] +script = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 1 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) + +[node name="Area2D" type="Area2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +shape = SubResource( 2 ) +[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"] diff --git a/scenes/Monde.tscn b/scenes/Monde.tscn new file mode 100644 index 0000000..533b8fa --- /dev/null +++ b/scenes/Monde.tscn @@ -0,0 +1,131 @@ +[gd_scene load_steps=9 format=2] + +[ext_resource path="res://images/joueur.png" type="Texture" id=1] +[ext_resource path="res://scripts/Joueur.gd" type="Script" id=2] +[ext_resource path="res://scenes/Ennemi.tscn" type="PackedScene" id=3] +[ext_resource path="res://images/Fond.png" type="Texture" id=4] +[ext_resource path="res://scenes/mur.tres" type="TileSet" id=5] +[ext_resource path="res://images/Lumière.png" type="Texture" id=6] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 8, 8 ) + +[sub_resource type="RectangleShape2D" id=2] +extents = Vector2( 9, 9 ) + +[node name="Monde" type="Node2D"] + +[node name="Joueur" type="KinematicBody2D" parent="."] +position = Vector2( -150, -150 ) +script = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Joueur"] +shape = SubResource( 1 ) + +[node name="Sprite" type="Sprite" parent="Joueur"] +texture = ExtResource( 1 ) + +[node name="Area2D" type="Area2D" parent="Joueur"] + +[node name="CollisionShape2D2" type="CollisionShape2D" parent="Joueur/Area2D"] +shape = SubResource( 2 ) + +[node name="Camera2D" type="Camera2D" parent="Joueur"] +current = true +zoom = Vector2( 0.6, 0.6 ) +smoothing_enabled = true + +[node name="Light2D" type="Light2D" parent="Joueur"] +texture = ExtResource( 6 ) +color = Color( 0.690196, 0.0117647, 0.0117647, 1 ) +shadow_enabled = true + +[node name="Ennemi" parent="." instance=ExtResource( 3 )] +position = Vector2( 136.022, 44.8325 ) + +[node name="Ennemi22" parent="." instance=ExtResource( 3 )] +position = Vector2( 464.455, 879.689 ) + +[node name="Ennemi23" parent="." instance=ExtResource( 3 )] +position = Vector2( 1045.04, -220.033 ) + +[node name="Ennemi24" parent="." instance=ExtResource( 3 )] +position = Vector2( 888.24, 180.444 ) + +[node name="Ennemi25" parent="." instance=ExtResource( 3 )] +position = Vector2( 638.207, -236.985 ) + +[node name="Ennemi26" parent="." instance=ExtResource( 3 )] +position = Vector2( 625.494, -92.8977 ) + +[node name="Ennemi18" parent="." instance=ExtResource( 3 )] +position = Vector2( 462.336, -232.747 ) + +[node name="Ennemi19" parent="." instance=ExtResource( 3 )] +position = Vector2( 80.9297, 470.737 ) + +[node name="Ennemi20" parent="." instance=ExtResource( 3 )] +position = Vector2( 462.336, 591.515 ) + +[node name="Ennemi21" parent="." instance=ExtResource( 3 )] +position = Vector2( 322.487, 142.303 ) + +[node name="Ennemi11" parent="." instance=ExtResource( 3 )] +position = Vector2( -344.974, 233.417 ) + +[node name="Ennemi12" parent="." instance=ExtResource( 3 )] +position = Vector2( -323.785, 453.785 ) + +[node name="Ennemi13" parent="." instance=ExtResource( 3 )] +position = Vector2( 900.954, -71.7085 ) + +[node name="Ennemi14" parent="." instance=ExtResource( 3 )] +position = Vector2( 1203.96, -84.422 ) + +[node name="Ennemi15" parent="." instance=ExtResource( 3 )] +position = Vector2( 1432.8, 216.465 ) + +[node name="Ennemi16" parent="." instance=ExtResource( 3 )] +position = Vector2( 1331.1, 466.499 ) + +[node name="Ennemi17" parent="." instance=ExtResource( 3 )] +position = Vector2( 1013.26, 237.655 ) + +[node name="Ennemi2" parent="." instance=ExtResource( 3 )] +position = Vector2( 896.716, 629.656 ) + +[node name="Ennemi3" parent="." instance=ExtResource( 3 )] +position = Vector2( 1377.71, 739.84 ) + +[node name="Ennemi4" parent="." instance=ExtResource( 3 )] +position = Vector2( 915.786, 879.689 ) + +[node name="Ennemi5" parent="." instance=ExtResource( 3 )] +position = Vector2( 248.325, 767.386 ) + +[node name="Ennemi6" parent="." instance=ExtResource( 3 )] +position = Vector2( -163.044, 437.294 ) + +[node name="Ennemi7" parent="." instance=ExtResource( 3 )] +position = Vector2( 781.651, 417.495 ) + +[node name="Ennemi8" parent="." instance=ExtResource( 3 )] +position = Vector2( 665.685, 80.9117 ) + +[node name="Ennemi9" parent="." instance=ExtResource( 3 )] +position = Vector2( 323.446, -78.8944 ) + +[node name="Ennemi10" parent="." instance=ExtResource( 3 )] +position = Vector2( -253.553, -220.316 ) + +[node name="Fond" type="Sprite" parent="."] +position = Vector2( 533.852, 352.509 ) +z_index = -1 +texture = ExtResource( 4 ) + +[node name="Murs" type="TileMap" parent="."] +tile_set = ExtResource( 5 ) +cell_size = Vector2( 16, 16 ) +format = 1 +tile_data = PoolIntArray( -1376258, 0, 0, -1376257, 0, 0, -1441792, 0, 0, -1441791, 0, 0, -1441790, 0, 0, -1441789, 0, 0, -1441788, 0, 0, -1441787, 0, 0, -1441786, 0, 0, -1441785, 0, 0, -1310728, 0, 0, -1310727, 0, 0, -1310726, 0, 0, -1310725, 0, 0, -1310724, 0, 0, -1310723, 0, 0, -1376248, 0, 0, -1376247, 0, 0, -1376246, 0, 0, -1376245, 0, 0, -1376244, 0, 0, -1376243, 0, 0, -1376242, 0, 0, -1376241, 0, 0, -1376240, 0, 0, -1376239, 0, 0, -1376238, 0, 0, -1376237, 0, 0, -1376236, 0, 0, -1376235, 0, 0, -1376234, 0, 0, -1376233, 0, 0, -1245202, 0, 0, -1245201, 0, 0, -1245200, 0, 0, -1245199, 0, 0, -1245197, 0, 0, -1245196, 0, 0, -1245195, 0, 0, -1245194, 0, 0, -1245193, 0, 0, -1310696, 0, 0, -1310695, 0, 0, -1310694, 0, 0, -1310693, 0, 0, -1310692, 0, 0, -1310691, 0, 0, -1310690, 0, 0, -1310689, 0, 0, -1310688, 0, 0, -1310687, 0, 0, -1310686, 0, 0, -1310685, 0, 0, -1310684, 0, 0, -1310683, 0, 0, -1310682, 0, 0, -1310681, 0, 0, -1179667, 0, 0, -1179666, 0, 0, -1179663, 0, 0, -1179662, 0, 0, -1179661, 0, 0, -1245144, 0, 0, -1245143, 0, 0, -1245142, 0, 0, -1245141, 0, 0, -1245140, 0, 0, -1245139, 0, 0, -1245138, 0, 0, -1245137, 0, 0, -1245136, 0, 0, -1245135, 0, 0, -1245134, 0, 0, -1245133, 0, 0, -1245132, 0, 0, -1114132, 0, 0, -1114131, 0, 0, -1179595, 0, 0, -1179594, 0, 0, -1179593, 0, 0, -1179592, 0, 0, -1179591, 0, 0, -1179590, 0, 0, -1179589, 0, 0, -1179588, 0, 0, -1179587, 0, 0, -1048596, 0, 0, -1114052, 0, 0, -1114051, 0, 0, -1114050, 0, 0, -1114049, 0, 0, -1114048, 0, 0, -1114047, 0, 0, -1114046, 0, 0, -983061, 0, 0, -983060, 0, 0, -1048516, 0, 0, -1048509, 0, 0, -1048508, 0, 0, -1048507, 0, 0, -1048506, 0, 0, -917525, 0, 0, -982981, 0, 0, -982970, 0, 0, -982969, 0, 0, -982968, 0, 0, -851990, 0, 0, -851989, 0, 0, -917445, 0, 0, -917434, 0, 0, -917431, 0, 0, -917430, 0, 0, -917429, 0, 0, -786454, 0, 0, -851954, 0, 0, -851924, 0, 0, -851910, 0, 0, -851909, 0, 0, -851899, 0, 0, -851898, 0, 0, -851892, 0, 0, -851891, 0, 0, -851890, 0, 0, -720918, 0, 0, -786418, 0, 0, -786417, 0, 0, -786416, 0, 0, -786389, 0, 0, -786388, 0, 0, -786382, 0, 0, -786374, 0, 0, -786364, 0, 0, -786363, 0, 0, -786354, 0, 0, -786353, 0, 0, -655382, 0, 0, -720846, 0, 0, -720838, 0, 0, -720828, 0, 0, -720817, 0, 0, -720816, 0, 0, -589847, 0, 0, -655311, 0, 0, -655310, 0, 0, -655303, 0, 0, -655302, 0, 0, -655293, 0, 0, -655279, 0, 0, -524311, 0, 0, -589819, 0, 0, -589796, 0, 0, -589795, 0, 0, -589768, 0, 0, -589767, 0, 0, -589759, 0, 0, -589758, 0, 0, -589743, 0, 0, -589742, 0, 0, -458775, 0, 0, -524284, 0, 0, -524283, 0, 0, -524259, 0, 0, -524224, 0, 0, -524223, 0, 0, -524206, 0, 0, -524205, 0, 0, -393240, 0, 0, -393239, 0, 0, -458748, 0, 0, -458723, 0, 0, -458689, 0, 0, -458688, 0, 0, -458668, 0, 0, -327704, 0, 0, -393212, 0, 0, -393187, 0, 0, -393154, 0, 0, -393153, 0, 0, -393132, 0, 0, -393131, 0, 0, -262168, 0, 0, -327676, 0, 0, -327651, 0, 0, -327619, 0, 0, -327618, 0, 0, -327595, 0, 0, -327594, 0, 0, -196632, 0, 0, -262084, 0, 0, -262083, 0, 0, -262058, 0, 0, -262057, 0, 0, -131096, 0, 0, -196594, 0, 0, -196593, 0, 0, -196592, 0, 0, -196568, 0, 0, -196567, 0, 0, -196549, 0, 0, -196548, 0, 0, -196521, 0, 0, -65560, 0, 0, -131032, 0, 0, -131013, 0, 0, -130985, 0, 0, -130984, 0, 0, -24, 0, 0, -65496, 0, 0, -65487, 0, 0, -65477, 0, 0, -65448, 0, 0, 65512, 0, 0, 38, 0, 0, 39, 0, 0, 47, 0, 0, 48, 0, 0, 49, 0, 0, 58, 0, 0, 59, 0, 0, 89, 0, 0, 131048, 0, 0, 65537, 0, 0, 65625, 0, 0, 196584, 0, 0, 131072, 0, 0, 131073, 0, 0, 131149, 0, 0, 131161, 0, 0, 262119, 0, 0, 262139, 0, 0, 262140, 0, 0, 262141, 0, 0, 262142, 0, 0, 262143, 0, 0, 196608, 0, 0, 196632, 0, 0, 196633, 0, 0, 196685, 0, 0, 196686, 0, 0, 196698, 0, 0, 327655, 0, 0, 327664, 0, 0, 327665, 0, 0, 262168, 0, 0, 262222, 0, 0, 262234, 0, 0, 393191, 0, 0, 393201, 0, 0, 393202, 0, 0, 393203, 0, 0, 393204, 0, 0, 393205, 0, 0, 327716, 0, 0, 327758, 0, 0, 327771, 0, 0, 458727, 0, 0, 393252, 0, 0, 393283, 0, 0, 393284, 0, 0, 393285, 0, 0, 393295, 0, 0, 393307, 0, 0, 524263, 0, 0, 458788, 0, 0, 458789, 0, 0, 458795, 0, 0, 458821, 0, 0, 458822, 0, 0, 458823, 0, 0, 458831, 0, 0, 458843, 0, 0, 458844, 0, 0, 589799, 0, 0, 524299, 0, 0, 524325, 0, 0, 524331, 0, 0, 524359, 0, 0, 524360, 0, 0, 524367, 0, 0, 524380, 0, 0, 655335, 0, 0, 655348, 0, 0, 589835, 0, 0, 589861, 0, 0, 589866, 0, 0, 589867, 0, 0, 589896, 0, 0, 589897, 0, 0, 589903, 0, 0, 589916, 0, 0, 720871, 0, 0, 720884, 0, 0, 655371, 0, 0, 655397, 0, 0, 655401, 0, 0, 655402, 0, 0, 655433, 0, 0, 655439, 0, 0, 655452, 0, 0, 786407, 0, 0, 786421, 0, 0, 786422, 0, 0, 720907, 0, 0, 720933, 0, 0, 720937, 0, 0, 720969, 0, 0, 720970, 0, 0, 720975, 0, 0, 720976, 0, 0, 720989, 0, 0, 851943, 0, 0, 851958, 0, 0, 851959, 0, 0, 851967, 0, 0, 786469, 0, 0, 786472, 0, 0, 786473, 0, 0, 786506, 0, 0, 786511, 0, 0, 786512, 0, 0, 786525, 0, 0, 917479, 0, 0, 917495, 0, 0, 917503, 0, 0, 851990, 0, 0, 851999, 0, 0, 852004, 0, 0, 852005, 0, 0, 852008, 0, 0, 852014, 0, 0, 852015, 0, 0, 852042, 0, 0, 852047, 0, 0, 852061, 0, 0, 983015, 0, 0, 983031, 0, 0, 983032, 0, 0, 983039, 0, 0, 917526, 0, 0, 917535, 0, 0, 917540, 0, 0, 917544, 0, 0, 917551, 0, 0, 917578, 0, 0, 917583, 0, 0, 917597, 0, 0, 1048551, 0, 0, 1048567, 0, 0, 1048568, 0, 0, 1048574, 0, 0, 1048575, 0, 0, 983060, 0, 0, 983061, 0, 0, 983062, 0, 0, 983070, 0, 0, 983071, 0, 0, 983076, 0, 0, 983080, 0, 0, 983087, 0, 0, 983113, 0, 0, 983114, 0, 0, 983119, 0, 0, 983133, 0, 0, 1114087, 0, 0, 1114097, 0, 0, 1114109, 0, 0, 1114110, 0, 0, 1048580, 0, 0, 1048606, 0, 0, 1048612, 0, 0, 1048615, 0, 0, 1048616, 0, 0, 1048623, 0, 0, 1048648, 0, 0, 1048649, 0, 0, 1048655, 0, 0, 1048656, 0, 0, 1048669, 0, 0, 1179623, 0, 0, 1179633, 0, 0, 1179645, 0, 0, 1114116, 0, 0, 1114117, 0, 0, 1114142, 0, 0, 1114147, 0, 0, 1114148, 0, 0, 1114151, 0, 0, 1114158, 0, 0, 1114183, 0, 0, 1114184, 0, 0, 1114192, 0, 0, 1114205, 0, 0, 1245159, 0, 0, 1245169, 0, 0, 1245181, 0, 0, 1245182, 0, 0, 1179653, 0, 0, 1179677, 0, 0, 1179678, 0, 0, 1179683, 0, 0, 1179687, 0, 0, 1179694, 0, 0, 1179717, 0, 0, 1179718, 0, 0, 1179719, 0, 0, 1179728, 0, 0, 1179741, 0, 0, 1310695, 0, 0, 1310706, 0, 0, 1310718, 0, 0, 1245189, 0, 0, 1245198, 0, 0, 1245212, 0, 0, 1245213, 0, 0, 1245218, 0, 0, 1245219, 0, 0, 1245223, 0, 0, 1245229, 0, 0, 1245230, 0, 0, 1245252, 0, 0, 1245253, 0, 0, 1245263, 0, 0, 1245277, 0, 0, 1376231, 0, 0, 1376242, 0, 0, 1376254, 0, 0, 1310725, 0, 0, 1310734, 0, 0, 1310745, 0, 0, 1310746, 0, 0, 1310747, 0, 0, 1310748, 0, 0, 1310754, 0, 0, 1310759, 0, 0, 1310765, 0, 0, 1310786, 0, 0, 1310787, 0, 0, 1310799, 0, 0, 1310813, 0, 0, 1441767, 0, 0, 1441778, 0, 0, 1441790, 0, 0, 1376261, 0, 0, 1376262, 0, 0, 1376270, 0, 0, 1376280, 0, 0, 1376281, 0, 0, 1376289, 0, 0, 1376290, 0, 0, 1376294, 0, 0, 1376295, 0, 0, 1376300, 0, 0, 1376301, 0, 0, 1376320, 0, 0, 1376321, 0, 0, 1376335, 0, 0, 1376349, 0, 0, 1507303, 0, 0, 1507314, 0, 0, 1507325, 0, 0, 1441798, 0, 0, 1441799, 0, 0, 1441806, 0, 0, 1441816, 0, 0, 1441825, 0, 0, 1441830, 0, 0, 1441836, 0, 0, 1441855, 0, 0, 1441856, 0, 0, 1441870, 0, 0, 1441871, 0, 0, 1441885, 0, 0, 1572839, 0, 0, 1572850, 0, 0, 1572860, 0, 0, 1572861, 0, 0, 1507335, 0, 0, 1507336, 0, 0, 1507337, 0, 0, 1507342, 0, 0, 1507352, 0, 0, 1507360, 0, 0, 1507361, 0, 0, 1507366, 0, 0, 1507371, 0, 0, 1507372, 0, 0, 1507388, 0, 0, 1507389, 0, 0, 1507390, 0, 0, 1507406, 0, 0, 1507421, 0, 0, 1638375, 0, 0, 1638396, 0, 0, 1572873, 0, 0, 1572874, 0, 0, 1572875, 0, 0, 1572876, 0, 0, 1572877, 0, 0, 1572878, 0, 0, 1572888, 0, 0, 1572896, 0, 0, 1572902, 0, 0, 1572907, 0, 0, 1572922, 0, 0, 1572923, 0, 0, 1572924, 0, 0, 1572941, 0, 0, 1572942, 0, 0, 1572957, 0, 0, 1703911, 0, 0, 1703932, 0, 0, 1638414, 0, 0, 1638423, 0, 0, 1638424, 0, 0, 1638432, 0, 0, 1638438, 0, 0, 1638443, 0, 0, 1638456, 0, 0, 1638457, 0, 0, 1638458, 0, 0, 1638476, 0, 0, 1638477, 0, 0, 1638493, 0, 0, 1769447, 0, 0, 1769468, 0, 0, 1703950, 0, 0, 1703959, 0, 0, 1703968, 0, 0, 1703973, 0, 0, 1703979, 0, 0, 1703991, 0, 0, 1703992, 0, 0, 1704012, 0, 0, 1704029, 0, 0, 1834983, 0, 0, 1835004, 0, 0, 1769485, 0, 0, 1769486, 0, 0, 1769495, 0, 0, 1769504, 0, 0, 1769508, 0, 0, 1769509, 0, 0, 1769515, 0, 0, 1769525, 0, 0, 1769526, 0, 0, 1769547, 0, 0, 1769548, 0, 0, 1769565, 0, 0, 1900519, 0, 0, 1900540, 0, 0, 1835021, 0, 0, 1835031, 0, 0, 1835040, 0, 0, 1835044, 0, 0, 1835051, 0, 0, 1835061, 0, 0, 1835077, 0, 0, 1835078, 0, 0, 1835079, 0, 0, 1835080, 0, 0, 1835081, 0, 0, 1835082, 0, 0, 1835100, 0, 0, 1966055, 0, 0, 1966076, 0, 0, 1900556, 0, 0, 1900557, 0, 0, 1900566, 0, 0, 1900576, 0, 0, 1900580, 0, 0, 1900586, 0, 0, 1900596, 0, 0, 1900597, 0, 0, 1900608, 0, 0, 1900609, 0, 0, 1900610, 0, 0, 1900611, 0, 0, 1900612, 0, 0, 1900636, 0, 0, 2031591, 0, 0, 2031613, 0, 0, 1966091, 0, 0, 1966092, 0, 0, 1966102, 0, 0, 1966112, 0, 0, 1966113, 0, 0, 1966115, 0, 0, 1966116, 0, 0, 1966122, 0, 0, 1966132, 0, 0, 1966141, 0, 0, 1966142, 0, 0, 1966143, 0, 0, 1966144, 0, 0, 1966172, 0, 0, 2097127, 0, 0, 2097150, 0, 0, 2097151, 0, 0, 2031626, 0, 0, 2031627, 0, 0, 2031638, 0, 0, 2031649, 0, 0, 2031650, 0, 0, 2031651, 0, 0, 2031658, 0, 0, 2031667, 0, 0, 2031677, 0, 0, 2031708, 0, 0, 2162664, 0, 0, 2162687, 0, 0, 2097152, 0, 0, 2097162, 0, 0, 2097174, 0, 0, 2097186, 0, 0, 2097187, 0, 0, 2097193, 0, 0, 2097194, 0, 0, 2097203, 0, 0, 2097212, 0, 0, 2097213, 0, 0, 2097244, 0, 0, 2228200, 0, 0, 2228209, 0, 0, 2228210, 0, 0, 2162688, 0, 0, 2162689, 0, 0, 2162698, 0, 0, 2162710, 0, 0, 2162723, 0, 0, 2162729, 0, 0, 2162738, 0, 0, 2162748, 0, 0, 2162780, 0, 0, 2293736, 0, 0, 2293746, 0, 0, 2228225, 0, 0, 2228226, 0, 0, 2228227, 0, 0, 2228233, 0, 0, 2228246, 0, 0, 2228259, 0, 0, 2228265, 0, 0, 2228274, 0, 0, 2228284, 0, 0, 2228285, 0, 0, 2228286, 0, 0, 2228316, 0, 0, 2359272, 0, 0, 2359282, 0, 0, 2293763, 0, 0, 2293764, 0, 0, 2293765, 0, 0, 2293766, 0, 0, 2293767, 0, 0, 2293768, 0, 0, 2293769, 0, 0, 2293770, 0, 0, 2293782, 0, 0, 2293795, 0, 0, 2293801, 0, 0, 2293809, 0, 0, 2293822, 0, 0, 2293823, 0, 0, 2293824, 0, 0, 2293851, 0, 0, 2424808, 0, 0, 2424818, 0, 0, 2424819, 0, 0, 2359304, 0, 0, 2359305, 0, 0, 2359306, 0, 0, 2359307, 0, 0, 2359308, 0, 0, 2359309, 0, 0, 2359310, 0, 0, 2359318, 0, 0, 2359331, 0, 0, 2359336, 0, 0, 2359337, 0, 0, 2359345, 0, 0, 2359360, 0, 0, 2359361, 0, 0, 2359362, 0, 0, 2359363, 0, 0, 2359364, 0, 0, 2359365, 0, 0, 2359366, 0, 0, 2359367, 0, 0, 2359368, 0, 0, 2359369, 0, 0, 2359370, 0, 0, 2359371, 0, 0, 2359372, 0, 0, 2359373, 0, 0, 2359374, 0, 0, 2359375, 0, 0, 2359376, 0, 0, 2359377, 0, 0, 2359378, 0, 0, 2359379, 0, 0, 2359380, 0, 0, 2359381, 0, 0, 2359382, 0, 0, 2359387, 0, 0, 2490344, 0, 0, 2490355, 0, 0, 2490356, 0, 0, 2490357, 0, 0, 2490358, 0, 0, 2490359, 0, 0, 2490360, 0, 0, 2490361, 0, 0, 2490362, 0, 0, 2490363, 0, 0, 2490364, 0, 0, 2490365, 0, 0, 2424847, 0, 0, 2424848, 0, 0, 2424849, 0, 0, 2424854, 0, 0, 2424867, 0, 0, 2424872, 0, 0, 2424880, 0, 0, 2424881, 0, 0, 2424918, 0, 0, 2424919, 0, 0, 2424923, 0, 0, 2555880, 0, 0, 2555901, 0, 0, 2555902, 0, 0, 2555903, 0, 0, 2490368, 0, 0, 2490386, 0, 0, 2490387, 0, 0, 2490390, 0, 0, 2490403, 0, 0, 2490408, 0, 0, 2490416, 0, 0, 2490455, 0, 0, 2490456, 0, 0, 2490458, 0, 0, 2490459, 0, 0, 2621416, 0, 0, 2621417, 0, 0, 2621418, 0, 0, 2621419, 0, 0, 2621420, 0, 0, 2555904, 0, 0, 2555905, 0, 0, 2555923, 0, 0, 2555924, 0, 0, 2555926, 0, 0, 2555939, 0, 0, 2555943, 0, 0, 2555953, 0, 0, 2555975, 0, 0, 2555976, 0, 0, 2555977, 0, 0, 2555978, 0, 0, 2555979, 0, 0, 2555980, 0, 0, 2555992, 0, 0, 2555993, 0, 0, 2555994, 0, 0, 2686952, 0, 0, 2686957, 0, 0, 2686958, 0, 0, 2686959, 0, 0, 2621441, 0, 0, 2621442, 0, 0, 2621460, 0, 0, 2621461, 0, 0, 2621475, 0, 0, 2621479, 0, 0, 2621489, 0, 0, 2621506, 0, 0, 2621507, 0, 0, 2621508, 0, 0, 2621509, 0, 0, 2621510, 0, 0, 2621511, 0, 0, 2621516, 0, 0, 2621517, 0, 0, 2621518, 0, 0, 2621519, 0, 0, 2621520, 0, 0, 2621530, 0, 0, 2752488, 0, 0, 2752495, 0, 0, 2752496, 0, 0, 2752497, 0, 0, 2686978, 0, 0, 2686979, 0, 0, 2686997, 0, 0, 2686998, 0, 0, 2687011, 0, 0, 2687015, 0, 0, 2687025, 0, 0, 2687037, 0, 0, 2687038, 0, 0, 2687039, 0, 0, 2687040, 0, 0, 2687041, 0, 0, 2687042, 0, 0, 2687055, 0, 0, 2687056, 0, 0, 2687066, 0, 0, 2818025, 0, 0, 2818033, 0, 0, 2752515, 0, 0, 2752516, 0, 0, 2752517, 0, 0, 2752534, 0, 0, 2752546, 0, 0, 2752547, 0, 0, 2752551, 0, 0, 2752562, 0, 0, 2752563, 0, 0, 2752567, 0, 0, 2752568, 0, 0, 2752569, 0, 0, 2752570, 0, 0, 2752571, 0, 0, 2752572, 0, 0, 2752573, 0, 0, 2752590, 0, 0, 2752591, 0, 0, 2752602, 0, 0, 2883561, 0, 0, 2883570, 0, 0, 2883571, 0, 0, 2883572, 0, 0, 2883573, 0, 0, 2883574, 0, 0, 2883575, 0, 0, 2883577, 0, 0, 2883578, 0, 0, 2883579, 0, 0, 2818054, 0, 0, 2818055, 0, 0, 2818056, 0, 0, 2818057, 0, 0, 2818058, 0, 0, 2818071, 0, 0, 2818072, 0, 0, 2818081, 0, 0, 2818082, 0, 0, 2818086, 0, 0, 2818087, 0, 0, 2818099, 0, 0, 2818100, 0, 0, 2818101, 0, 0, 2818102, 0, 0, 2818103, 0, 0, 2818125, 0, 0, 2818137, 0, 0, 2949097, 0, 0, 2949098, 0, 0, 2949107, 0, 0, 2949108, 0, 0, 2949111, 0, 0, 2949112, 0, 0, 2949113, 0, 0, 2883589, 0, 0, 2883590, 0, 0, 2883594, 0, 0, 2883595, 0, 0, 2883596, 0, 0, 2883608, 0, 0, 2883609, 0, 0, 2883610, 0, 0, 2883611, 0, 0, 2883612, 0, 0, 2883613, 0, 0, 2883614, 0, 0, 2883615, 0, 0, 2883616, 0, 0, 2883617, 0, 0, 2883622, 0, 0, 2883630, 0, 0, 2883658, 0, 0, 2883659, 0, 0, 2883660, 0, 0, 2883673, 0, 0, 3014634, 0, 0, 2949123, 0, 0, 2949124, 0, 0, 2949129, 0, 0, 2949130, 0, 0, 2949158, 0, 0, 2949166, 0, 0, 2949167, 0, 0, 2949192, 0, 0, 2949193, 0, 0, 2949194, 0, 0, 2949209, 0, 0, 3080170, 0, 0, 3014658, 0, 0, 3014659, 0, 0, 3014664, 0, 0, 3014665, 0, 0, 3014694, 0, 0, 3014703, 0, 0, 3014704, 0, 0, 3014721, 0, 0, 3014722, 0, 0, 3014723, 0, 0, 3014724, 0, 0, 3014725, 0, 0, 3014726, 0, 0, 3014727, 0, 0, 3014728, 0, 0, 3014744, 0, 0, 3145707, 0, 0, 3080194, 0, 0, 3080200, 0, 0, 3080201, 0, 0, 3080230, 0, 0, 3080240, 0, 0, 3080252, 0, 0, 3080253, 0, 0, 3080254, 0, 0, 3080255, 0, 0, 3080256, 0, 0, 3080257, 0, 0, 3080261, 0, 0, 3080262, 0, 0, 3080263, 0, 0, 3080280, 0, 0, 3211244, 0, 0, 3145730, 0, 0, 3145736, 0, 0, 3145737, 0, 0, 3145750, 0, 0, 3145751, 0, 0, 3145752, 0, 0, 3145753, 0, 0, 3145754, 0, 0, 3145755, 0, 0, 3145756, 0, 0, 3145757, 0, 0, 3145766, 0, 0, 3145767, 0, 0, 3145776, 0, 0, 3145777, 0, 0, 3145786, 0, 0, 3145787, 0, 0, 3145788, 0, 0, 3145796, 0, 0, 3145797, 0, 0, 3145816, 0, 0, 3276780, 0, 0, 3211266, 0, 0, 3211272, 0, 0, 3211285, 0, 0, 3211293, 0, 0, 3211294, 0, 0, 3211303, 0, 0, 3211313, 0, 0, 3211321, 0, 0, 3211322, 0, 0, 3211331, 0, 0, 3211332, 0, 0, 3211351, 0, 0, 3342317, 0, 0, 3276802, 0, 0, 3276803, 0, 0, 3276807, 0, 0, 3276808, 0, 0, 3276820, 0, 0, 3276821, 0, 0, 3276830, 0, 0, 3276831, 0, 0, 3276839, 0, 0, 3276849, 0, 0, 3276866, 0, 0, 3276867, 0, 0, 3276887, 0, 0, 3407854, 0, 0, 3407859, 0, 0, 3407860, 0, 0, 3407861, 0, 0, 3407862, 0, 0, 3407863, 0, 0, 3407864, 0, 0, 3407865, 0, 0, 3407866, 0, 0, 3407867, 0, 0, 3407868, 0, 0, 3342339, 0, 0, 3342343, 0, 0, 3342356, 0, 0, 3342367, 0, 0, 3342375, 0, 0, 3342385, 0, 0, 3342401, 0, 0, 3342402, 0, 0, 3342422, 0, 0, 3342423, 0, 0, 3473390, 0, 0, 3473391, 0, 0, 3473392, 0, 0, 3473393, 0, 0, 3473394, 0, 0, 3473395, 0, 0, 3473404, 0, 0, 3473405, 0, 0, 3407879, 0, 0, 3407892, 0, 0, 3407903, 0, 0, 3407911, 0, 0, 3407921, 0, 0, 3407937, 0, 0, 3407957, 0, 0, 3407958, 0, 0, 3538927, 0, 0, 3538928, 0, 0, 3538942, 0, 0, 3473414, 0, 0, 3473422, 0, 0, 3473423, 0, 0, 3473424, 0, 0, 3473425, 0, 0, 3473426, 0, 0, 3473427, 0, 0, 3473428, 0, 0, 3473433, 0, 0, 3473439, 0, 0, 3473447, 0, 0, 3473457, 0, 0, 3473473, 0, 0, 3473493, 0, 0, 3604464, 0, 0, 3604465, 0, 0, 3538949, 0, 0, 3538950, 0, 0, 3538958, 0, 0, 3538959, 0, 0, 3538968, 0, 0, 3538969, 0, 0, 3538975, 0, 0, 3538984, 0, 0, 3538993, 0, 0, 3539009, 0, 0, 3539028, 0, 0, 3670002, 0, 0, 3670003, 0, 0, 3670004, 0, 0, 3604485, 0, 0, 3604495, 0, 0, 3604496, 0, 0, 3604503, 0, 0, 3604504, 0, 0, 3604511, 0, 0, 3604520, 0, 0, 3604529, 0, 0, 3604545, 0, 0, 3604561, 0, 0, 3604562, 0, 0, 3604563, 0, 0, 3735540, 0, 0, 3735541, 0, 0, 3735542, 0, 0, 3670021, 0, 0, 3670032, 0, 0, 3670033, 0, 0, 3670034, 0, 0, 3670035, 0, 0, 3670036, 0, 0, 3670037, 0, 0, 3670038, 0, 0, 3670039, 0, 0, 3670047, 0, 0, 3670056, 0, 0, 3670065, 0, 0, 3670066, 0, 0, 3670081, 0, 0, 3670094, 0, 0, 3670095, 0, 0, 3670096, 0, 0, 3801079, 0, 0, 3801080, 0, 0, 3801081, 0, 0, 3801082, 0, 0, 3735557, 0, 0, 3735583, 0, 0, 3735592, 0, 0, 3735602, 0, 0, 3735617, 0, 0, 3735621, 0, 0, 3735622, 0, 0, 3735623, 0, 0, 3735624, 0, 0, 3735625, 0, 0, 3735626, 0, 0, 3735627, 0, 0, 3735628, 0, 0, 3735629, 0, 0, 3866619, 0, 0, 3866620, 0, 0, 3866621, 0, 0, 3866622, 0, 0, 3866623, 0, 0, 3801088, 0, 0, 3801093, 0, 0, 3801094, 0, 0, 3801119, 0, 0, 3801129, 0, 0, 3801138, 0, 0, 3801139, 0, 0, 3801150, 0, 0, 3801151, 0, 0, 3801152, 0, 0, 3801153, 0, 0, 3801154, 0, 0, 3801155, 0, 0, 3801156, 0, 0, 3866625, 0, 0, 3866626, 0, 0, 3866627, 0, 0, 3866628, 0, 0, 3866629, 0, 0, 3866631, 0, 0, 3866632, 0, 0, 3866633, 0, 0, 3866655, 0, 0, 3866665, 0, 0, 3866666, 0, 0, 3866675, 0, 0, 3866680, 0, 0, 3866681, 0, 0, 3866682, 0, 0, 3866683, 0, 0, 3866684, 0, 0, 3866685, 0, 0, 3932165, 0, 0, 3932166, 0, 0, 3932167, 0, 0, 3932168, 0, 0, 3932169, 0, 0, 3932170, 0, 0, 3932171, 0, 0, 3932172, 0, 0, 3932173, 0, 0, 3932190, 0, 0, 3932191, 0, 0, 3932195, 0, 0, 3932196, 0, 0, 3932197, 0, 0, 3932198, 0, 0, 3932199, 0, 0, 3932200, 0, 0, 3932201, 0, 0, 3932202, 0, 0, 3932203, 0, 0, 3932204, 0, 0, 3932205, 0, 0, 3932206, 0, 0, 3932207, 0, 0, 3932208, 0, 0, 3932209, 0, 0, 3932210, 0, 0, 3932211, 0, 0, 3932212, 0, 0, 3932213, 0, 0, 3932214, 0, 0, 3932215, 0, 0, 3997710, 0, 0, 3997711, 0, 0, 3997712, 0, 0, 3997713, 0, 0, 3997714, 0, 0, 3997715, 0, 0, 3997716, 0, 0, 3997717, 0, 0, 3997718, 0, 0, 3997719, 0, 0, 3997720, 0, 0, 3997721, 0, 0, 3997722, 0, 0, 3997723, 0, 0, 3997724, 0, 0, 3997725, 0, 0, 3997726, 0, 0, 3997727, 0, 0, 3997728, 0, 0, 3997729, 0, 0, 3997730, 0, 0 ) +[connection signal="body_entered" from="Joueur/Area2D" to="Joueur" method="_on_Area2D_body_entered"] diff --git a/scenes/mur.tres b/scenes/mur.tres new file mode 100644 index 0000000..020b420 --- /dev/null +++ b/scenes/mur.tres @@ -0,0 +1,33 @@ +[gd_resource type="TileSet" load_steps=4 format=2] + +[ext_resource path="res://images/Batiment.png" type="Texture" id=1] + +[sub_resource type="OccluderPolygon2D" id=1] +polygon = PoolVector2Array( -8.00226, -7.97379, -7.99188, 7.99426, 8.00321, 7.99426, 8.01305, -8.00083 ) + +[sub_resource type="RectangleShape2D" id=2] +extents = Vector2( 8, 8 ) + +[resource] +0/name = "Sprite" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 0, 0, 16, 16 ) +0/tile_mode = 0 +0/occluder_offset = Vector2( 8, 8 ) +0/occluder = SubResource( 1 ) +0/navigation_offset = Vector2( 8, 8 ) +0/shape_offset = Vector2( 8, 8 ) +0/shape_transform = Transform2D( 1, 0, 0, 1, 8, 8 ) +0/shape = SubResource( 2 ) +0/shape_one_way = false +0/shape_one_way_margin = 1.0 +0/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 2 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 8, 8 ) +} ] +0/z_index = 0 diff --git a/scenes/mur.tscn b/scenes/mur.tscn new file mode 100644 index 0000000..9ff6f60 --- /dev/null +++ b/scenes/mur.tscn @@ -0,0 +1,22 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://images/Batiment.png" type="Texture" id=1] + +[sub_resource type="RectangleShape2D" id=2] +extents = Vector2( 8, 8 ) + +[sub_resource type="OccluderPolygon2D" id=1] +polygon = PoolVector2Array( -8.00226, -7.97379, -7.99188, 7.99426, 8.00321, 7.99426, 8.01305, -8.00083 ) + +[node name="Node2D" type="Node2D"] + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) + +[node name="StaticBody2D" type="StaticBody2D" parent="Sprite"] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Sprite/StaticBody2D"] +shape = SubResource( 2 ) + +[node name="LightOccluder2D" type="LightOccluder2D" parent="Sprite"] +occluder = SubResource( 1 ) diff --git a/scripts/Ennemi.gd b/scripts/Ennemi.gd new file mode 100644 index 0000000..f72321b --- /dev/null +++ b/scripts/Ennemi.gd @@ -0,0 +1,18 @@ +extends KinematicBody2D + +var deplacement = Vector2() + +func _ready(): + pass + +func _physics_process(delta): + var Joueur = get_parent().get_node("Joueur") # récupère le joueur + + position += (Joueur.position - position) / 50 # rapidité + look_at(Joueur.position) # regarde le joueur + + move_and_collide(deplacement) # initie le déplacement + +func _on_Area2D_body_entered(body): + if "Balle" in body.name: + queue_free() diff --git a/scripts/Joueur.gd b/scripts/Joueur.gd new file mode 100644 index 0000000..b08404f --- /dev/null +++ b/scripts/Joueur.gd @@ -0,0 +1,42 @@ +extends KinematicBody2D + +var vitesseDeplacement = 500 +var vitesseBalle = 2000 + +var balle = preload("res://scenes/Balle.tscn") + +func _ready(): + pass + +func _process(delta): + var deplacement = Vector2() # déplacement du personnage + + if Input.is_action_pressed("haut"): # vers le haut + deplacement.y -= 1 + if Input.is_action_pressed("bas"): # vers le bas + deplacement.y += 1 + if Input.is_action_pressed("gauche"): # vers la gauche + deplacement.x -= 1 + if Input.is_action_pressed("droite"): # vers la droite + deplacement.x += 1 + + deplacement = deplacement.normalized() # empeche de doubler la vitesse en diagonale + deplacement = move_and_slide(deplacement * vitesseDeplacement) # vitesse + look_at(get_global_mouse_position()) # regarde le curseur + + if Input.is_action_just_pressed("clicGauche"): + tir() + +func tir(): + var objectBalle = balle.instance() # création object balle + objectBalle.position = get_global_position() # récupération de la position + objectBalle.rotation_degrees = rotation_degrees # récupération du degré de rotation + objectBalle.apply_impulse(Vector2(), Vector2(vitesseBalle, 0).rotated(rotation)) # lancement de la balle + get_tree().get_root().call_deferred("add_child", objectBalle) # ajout de la balle + +func mort(): + get_tree().reload_current_scene() + +func _on_Area2D_body_entered(body): + if "Ennemi" in body.name: # collision avec l'ennemi + mort()