Browse Source

Creee la balle

DricomDragon 11 months ago
parent
commit
40119a7423

BIN
godot/composants/objets/balle/ball.png


+ 34 - 0
godot/composants/objets/balle/ball.png.import

@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://muesywtpa7lp"
+path="res://.godot/imported/ball.png-f375127d27b6e72383d26e2433a04ab8.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://composants/objets/balle/ball.png"
+dest_files=["res://.godot/imported/ball.png-f375127d27b6e72383d26e2433a04ab8.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1

+ 21 - 0
godot/composants/objets/balle/balle.tscn

@@ -0,0 +1,21 @@
+[gd_scene load_steps=4 format=3 uid="uid://vilrv0y5q2re"]
+
+[ext_resource type="PhysicsMaterial" uid="uid://c6bddricwmcxx" path="res://commun/materiaux/metal.tres" id="1_wa4mj"]
+[ext_resource type="Texture2D" uid="uid://muesywtpa7lp" path="res://composants/objets/balle/ball.png" id="2_j5m82"]
+
+[sub_resource type="CircleShape2D" id="CircleShape2D_lab73"]
+radius = 5.42
+
+[node name="Balle" type="RigidBody2D"]
+physics_material_override = ExtResource("1_wa4mj")
+gravity_scale = 0.0
+lock_rotation = true
+linear_velocity = Vector2(0, 600)
+linear_damp_mode = 1
+angular_damp_mode = 1
+
+[node name="Image" type="Sprite2D" parent="."]
+texture = ExtResource("2_j5m82")
+
+[node name="Forme" type="CollisionShape2D" parent="."]
+shape = SubResource("CircleShape2D_lab73")

+ 5 - 1
godot/exec/niveaux/carre_simple.tscn

@@ -1,6 +1,7 @@
-[gd_scene load_steps=3 format=3 uid="uid://cyyb8weydthjc"]
+[gd_scene load_steps=4 format=3 uid="uid://cyyb8weydthjc"]
 
 [ext_resource type="PackedScene" uid="uid://cpo1b44exbbyf" path="res://composants/objets/raquette/raquette.tscn" id="1_dbta1"]
+[ext_resource type="PackedScene" uid="uid://vilrv0y5q2re" path="res://composants/objets/balle/balle.tscn" id="2_cq21n"]
 [ext_resource type="PackedScene" uid="uid://brd8yid3l7wgm" path="res://composants/objets/brique/brique.tscn" id="2_j0emn"]
 
 [node name="CarreSimple" type="Node2D"]
@@ -8,6 +9,9 @@
 [node name="Raquette" parent="." instance=ExtResource("1_dbta1")]
 position = Vector2(576, 592)
 
+[node name="Balle1" parent="." instance=ExtResource("2_cq21n")]
+position = Vector2(576, 400)
+
 [node name="Briques" type="Node2D" parent="."]
 
 [node name="Brique1" parent="Briques" instance=ExtResource("2_j0emn")]