des indices d'intéractions à base de shaders et de bulles

This commit is contained in:
Thomas
2025-03-19 17:13:57 +01:00
parent 65af087d46
commit 0b805448ee
19 changed files with 1616 additions and 44 deletions

90
UI/clues/bubble_clue.tscn Normal file
View File

@@ -0,0 +1,90 @@
[gd_scene load_steps=7 format=3 uid="uid://dn10ervwv15oo"]
[ext_resource type="Texture2D" uid="uid://cwbhdira3w8qx" path="res://assest/ui/UI_48x48.png" id="1_o6ktm"]
[ext_resource type="Script" path="res://UI/clues/button_clue.gd" id="2_iwm3w"]
[sub_resource type="LabelSettings" id="LabelSettings_yr8f5"]
font_color = Color(0, 0, 0, 1)
[sub_resource type="Animation" id="Animation_srt4p"]
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:offset")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Label:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(-18, -14)]
}
[sub_resource type="Animation" id="Animation_puwvl"]
resource_name = "move"
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:offset")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.266667, 0.533333, 0.733333),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [Vector2(0, 0), Vector2(0, 1), Vector2(0, 2), Vector2(0, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Label:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.266667, 0.533333, 0.733333),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [Vector2(-18, -14), Vector2(-18, -13), Vector2(-18, -12), Vector2(-18, -13)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_kli7q"]
_data = {
"RESET": SubResource("Animation_srt4p"),
"move": SubResource("Animation_puwvl")
}
[node name="Sprite2D" type="Sprite2D"]
texture = ExtResource("1_o6ktm")
hframes = 18
vframes = 9
frame = 5
script = ExtResource("2_iwm3w")
[node name="Label" type="Label" parent="."]
offset_left = -18.0
offset_top = -14.0
offset_right = 18.0
offset_bottom = 19.0
text = "E"
label_settings = SubResource("LabelSettings_yr8f5")
horizontal_alignment = 1
vertical_alignment = 1
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_kli7q")
}

9
UI/clues/button_clue.gd Normal file
View File

@@ -0,0 +1,9 @@
extends Sprite2D
class_name Clue
func setVisible(isV: bool):
visible = isV
if isV:
$AnimationPlayer.play("move")
else:
$AnimationPlayer.stop()

87
UI/clues/button_clue.tscn Normal file
View File

@@ -0,0 +1,87 @@
[gd_scene load_steps=6 format=3 uid="uid://clqdxhwojbkwp"]
[ext_resource type="Texture2D" uid="uid://b7k2x0bnxlhwh" path="res://assest/ui/Modern_UI_Style_2_48x48.png" id="1_cr0we"]
[ext_resource type="Script" path="res://UI/clues/button_clue.gd" id="2_md8cj"]
[sub_resource type="Animation" id="Animation_srt4p"]
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.233333, 0.5, 0.733333),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [432, 433, 434, 433]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Label:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.233333, 0.5, 0.733333),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [Vector2(-18, 3), Vector2(-18, 5), Vector2(-18, 7), Vector2(-18, 5)]
}
[sub_resource type="Animation" id="Animation_puwvl"]
resource_name = "move"
length = 0.75
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.266667, 0.533333),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [432, 433, 434]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Label:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.266667, 0.533333),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [Vector2(-18, 3), Vector2(-18, 5), Vector2(-18, 7)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_kli7q"]
_data = {
"RESET": SubResource("Animation_srt4p"),
"move": SubResource("Animation_puwvl")
}
[node name="Sprite2D" type="Sprite2D"]
texture = ExtResource("1_cr0we")
hframes = 49
vframes = 17
frame = 432
script = ExtResource("2_md8cj")
[node name="Label" type="Label" parent="."]
offset_left = -18.0
offset_top = 3.0
offset_right = 18.0
offset_bottom = 36.0
text = "E"
horizontal_alignment = 1
vertical_alignment = 1
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_kli7q")
}