Browse Source

Creee une raquette

DricomDragon 11 tháng trước cách đây
mục cha
commit
b72ca77932

+ 5 - 0
godot/commun/materiaux/metal.tres

@@ -0,0 +1,5 @@
+[gd_resource type="PhysicsMaterial" format=3 uid="uid://c6bddricwmcxx"]
+
+[resource]
+friction = 0.0
+bounce = 1.0

+ 17 - 0
godot/composants/objets/raquette/raquette.tscn

@@ -0,0 +1,17 @@
+[gd_scene load_steps=4 format=3 uid="uid://cpo1b44exbbyf"]
+
+[ext_resource type="PhysicsMaterial" uid="uid://c6bddricwmcxx" path="res://commun/materiaux/metal.tres" id="1_0thl6"]
+[ext_resource type="Texture2D" uid="uid://chi8i5odmp41w" path="res://icon.svg" id="2_2o1qk"]
+
+[sub_resource type="RectangleShape2D" id="RectangleShape2D_ong6t"]
+size = Vector2(104, 25)
+
+[node name="Raquette" type="StaticBody2D"]
+physics_material_override = ExtResource("1_0thl6")
+
+[node name="Image" type="Sprite2D" parent="."]
+scale = Vector2(0.826, 0.2)
+texture = ExtResource("2_2o1qk")
+
+[node name="Forme" type="CollisionShape2D" parent="."]
+shape = SubResource("RectangleShape2D_ong6t")

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

@@ -1,3 +1,8 @@
-[gd_scene format=3 uid="uid://cyyb8weydthjc"]
+[gd_scene load_steps=2 format=3 uid="uid://cyyb8weydthjc"]
+
+[ext_resource type="PackedScene" uid="uid://cpo1b44exbbyf" path="res://composants/objets/raquette/raquette.tscn" id="1_dbta1"]
 
 [node name="CarreSimple" type="Node2D"]
+
+[node name="Raquette" parent="." instance=ExtResource("1_dbta1")]
+position = Vector2(576, 592)