From 4d17c3399f53f06b6e3498a5f4ad2421cb79bcfd Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 7 Apr 2021 21:07:51 +0200 Subject: [PATCH] update --- scenes/Balle.tscn | 5 ++--- scenes/Ennemi.tscn | 1 - scenes/Monde.tscn | 20 +++++++++++++++++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/scenes/Balle.tscn b/scenes/Balle.tscn index 96d4d60..b2b4654 100644 --- a/scenes/Balle.tscn +++ b/scenes/Balle.tscn @@ -3,15 +3,14 @@ [ext_resource path="res://assets/images/balle.png" type="Texture" id=1] [ext_resource path="res://scripts/Balle.gd" type="Script" id=2] - -[sub_resource type="RectangleShape2D" id=2] +[sub_resource type="RectangleShape2D" id=1] extents = Vector2( 4, 1.5 ) [node name="Area2D" type="Area2D"] script = ExtResource( 2 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource( 2 ) +shape = SubResource( 1 ) [node name="Sprite" type="Sprite" parent="."] texture = ExtResource( 1 ) diff --git a/scenes/Ennemi.tscn b/scenes/Ennemi.tscn index eb2a5c5..519ad22 100644 --- a/scenes/Ennemi.tscn +++ b/scenes/Ennemi.tscn @@ -3,7 +3,6 @@ [ext_resource path="res://assets/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 ) diff --git a/scenes/Monde.tscn b/scenes/Monde.tscn index 1eada6a..f6f9094 100644 --- a/scenes/Monde.tscn +++ b/scenes/Monde.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=11 format=2] +[gd_scene load_steps=14 format=2] [ext_resource path="res://assets/images/joueur.png" type="Texture" id=1] [ext_resource path="res://scripts/Joueur.gd" type="Script" id=2] @@ -7,6 +7,8 @@ [ext_resource path="res://scenes/mur.tres" type="TileSet" id=5] [ext_resource path="res://assets/images/lumiere.png" type="Texture" id=6] [ext_resource path="res://assets/sounds/background.wav" type="AudioStream" id=7] +[ext_resource path="res://assets/images/sortie.png" type="Texture" id=8] +[ext_resource path="res://scripts/PortailDeFin.gd" type="Script" id=9] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 8, 8 ) @@ -17,6 +19,9 @@ extents = Vector2( 9, 9 ) [sub_resource type="CanvasItemMaterial" id=3] light_mode = 2 +[sub_resource type="CircleShape2D" id=4] +radius = 35.9876 + [node name="Monde" type="Node2D"] [node name="Joueur" type="KinematicBody2D" parent="."] @@ -168,4 +173,17 @@ tile_data = PoolIntArray( -1376258, 0, 0, -1376257, 0, 0, -1441792, 0, 0, -14417 [node name="CanvasModulate" type="CanvasModulate" parent="."] color = Color( 0.27451, 0.27451, 0.27451, 1 ) + +[node name="Portail de fin" type="Area2D" parent="."] +script = ExtResource( 9 ) + +[node name="Sprite" type="Sprite" parent="Portail de fin"] +position = Vector2( 1150, 860 ) +scale = Vector2( 1.5, 1.5 ) +texture = ExtResource( 8 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Portail de fin"] +position = Vector2( 1150, 860 ) +shape = SubResource( 4 ) [connection signal="body_entered" from="Joueur/Area2D" to="Joueur" method="_on_Area2D_body_entered"] +[connection signal="body_entered" from="Portail de fin" to="Portail de fin" method="_on_Portail_de_fin_body_entered"]