Dev Beta 1.3

* Ajout d'un déblocage des mutations, dans une scène 3D trouvable dans les runs, ainsi qu'un dialogue d'annonce de ces scènes
* Augmentation des charges par map à 10 et augmentation des objectifs de points de plantes en conséquence
* Modification du loot des graines : les plantes donnent désormais un nombre fixe de graine et les graines issues de veine de Talion n'obtiennent pas automatiquement de mutations
* Les portes ne seront désormais plus sur de la pierre
* Amélioration du tutoriel pour inclure une section d'explication des mutations
* Ajout du modificateur de région Magnétique qui divise l'objectif et les recharges par 2
*
This commit is contained in:
2026-05-09 16:40:22 +02:00
parent e2b07e2b6a
commit c8e0e9ecce
81 changed files with 2838 additions and 1139 deletions

Binary file not shown.

View File

@@ -0,0 +1,68 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://mwk845fx5ye2"
path="res://.godot/imported/cristal.blend-5fdcaa76cec17f12715c1ff4a4caf324.scn"
[deps]
source_file="res://entities/interactable_3d/cristal/assets/cristal.blend"
dest_files=["res://.godot/imported/cristal.blend-5fdcaa76cec17f12715c1ff4a4caf324.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={
"materials": {
"Default3D": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
"use_external/path": "uid://dvvi1k5c5iowc"
}
}
}
blender/nodes/visible=0
blender/nodes/active_collection_only=false
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/colors=false
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/export_geometry_nodes_instances=false
blender/meshes/gpu_instances=false
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true
gltf/naming_version=2

View File

@@ -0,0 +1,68 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://d0sdfjneo8rjj"
path="res://.godot/imported/cristal_crack_1.blend-01f6238e5ee6ec34d1d8a421f878430c.scn"
[deps]
source_file="res://entities/interactable_3d/cristal/assets/cristal_crack_1.blend"
dest_files=["res://.godot/imported/cristal_crack_1.blend-01f6238e5ee6ec34d1d8a421f878430c.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={
"materials": {
"Default3D": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
"use_external/path": "uid://dvvi1k5c5iowc"
}
}
}
blender/nodes/visible=0
blender/nodes/active_collection_only=false
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/colors=false
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/export_geometry_nodes_instances=false
blender/meshes/gpu_instances=false
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true
gltf/naming_version=2

View File

@@ -0,0 +1,68 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b8cqw348lx15s"
path="res://.godot/imported/cristal_crack_2.blend-e5cf949346bc85a9c664c66dde3ab25a.scn"
[deps]
source_file="res://entities/interactable_3d/cristal/assets/cristal_crack_2.blend"
dest_files=["res://.godot/imported/cristal_crack_2.blend-e5cf949346bc85a9c664c66dde3ab25a.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={
"materials": {
"Default3D": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
"use_external/path": "uid://dvvi1k5c5iowc"
}
}
}
blender/nodes/visible=0
blender/nodes/active_collection_only=false
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/colors=false
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/export_geometry_nodes_instances=false
blender/meshes/gpu_instances=false
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true
gltf/naming_version=2

View File

@@ -0,0 +1,68 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://c7p114rvk26xw"
path="res://.godot/imported/cristal_crack_3.blend-513c4ee47a074edd5c96e86c23a0716a.scn"
[deps]
source_file="res://entities/interactable_3d/cristal/assets/cristal_crack_3.blend"
dest_files=["res://.godot/imported/cristal_crack_3.blend-513c4ee47a074edd5c96e86c23a0716a.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={
"materials": {
"Default3D": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
"use_external/path": "uid://dvvi1k5c5iowc"
}
}
}
blender/nodes/visible=0
blender/nodes/active_collection_only=false
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/colors=false
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/export_geometry_nodes_instances=false
blender/meshes/gpu_instances=false
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true
gltf/naming_version=2

Binary file not shown.

View File

@@ -0,0 +1,87 @@
[gd_scene format=3 uid="uid://8rorj31s3irn"]
[ext_resource type="Script" uid="uid://dwn3g8c5sa0a2" path="res://entities/interactable_3d/cristal/scripts/cristal.gd" id="1_ci2hw"]
[ext_resource type="AudioStream" uid="uid://ctfaxvblcg5lc" path="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_1.wav" id="2_247i2"]
[ext_resource type="PackedScene" uid="uid://mwk845fx5ye2" path="res://entities/interactable_3d/cristal/assets/cristal.blend" id="2_ci2hw"]
[ext_resource type="PackedScene" uid="uid://c7p114rvk26xw" path="res://entities/interactable_3d/cristal/assets/cristal_crack_3.blend" id="2_vejte"]
[ext_resource type="AudioStream" uid="uid://c1dnklmka2ccn" path="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_2.wav" id="3_k7wsc"]
[ext_resource type="PackedScene" uid="uid://d0sdfjneo8rjj" path="res://entities/interactable_3d/cristal/assets/cristal_crack_1.blend" id="3_nvfy2"]
[ext_resource type="AudioStream" uid="uid://dd1uu6dd6sloe" path="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_3.wav" id="4_qeist"]
[ext_resource type="AudioStream" uid="uid://eq7wufwnolto" path="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_4.wav" id="5_22ghi"]
[ext_resource type="PackedScene" uid="uid://brp1fpvasaims" path="res://entities/interactable_3d/cristal/mutation_announce.tscn" id="9_247i2"]
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_ojmpp"]
streams_count = 4
stream_0/stream = ExtResource("2_247i2")
stream_1/stream = ExtResource("3_k7wsc")
stream_2/stream = ExtResource("4_qeist")
stream_3/stream = ExtResource("5_22ghi")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ci2hw"]
transparency = 1
shading_mode = 0
vertex_color_use_as_albedo = true
[sub_resource type="PrismMesh" id="PrismMesh_nvfy2"]
lightmap_size_hint = Vector2i(14, 21)
material = SubResource("StandardMaterial3D_ci2hw")
size = Vector3(0.2, 0.2, 0.2)
[sub_resource type="Gradient" id="Gradient_ci2hw"]
offsets = PackedFloat32Array(0, 0.80349344, 1)
colors = PackedColorArray(1, 0.6509804, 0.09019608, 1, 1, 0.1764706, 0.3372549, 0.827451, 1, 0, 0.43137255, 0)
[sub_resource type="BoxShape3D" id="BoxShape3D_nvfy2"]
size = Vector3(1, 2.0454712, 1)
[node name="Cristal" type="Area3D" unique_id=1403604311]
script = ExtResource("1_ci2hw")
metadata/_custom_type_script = "uid://bj4d1x8n8ina"
[node name="BreackAudioPlayer" type="AudioStreamPlayer3D" parent="." unique_id=1190729820]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.0430325, 0)
stream = SubResource("AudioStreamRandomizer_ojmpp")
[node name="BreakParticles" type="CPUParticles3D" parent="." unique_id=1968257379]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.0430325, 0)
emitting = false
amount = 16
lifetime = 0.5
one_shot = true
speed_scale = 1.5
explosiveness = 1.0
mesh = SubResource("PrismMesh_nvfy2")
particle_flag_rotate_y = true
direction = Vector3(0, 1, 0)
initial_velocity_min = 1.0
initial_velocity_max = 4.0
angular_velocity_min = -90.0
angular_velocity_max = -90.0
angle_min = -180.0
angle_max = 180.0
scale_amount_min = 0.5
color = Color(1, 0.6509804, 0.09019608, 1)
color_ramp = SubResource("Gradient_ci2hw")
[node name="CristalModel" parent="." unique_id=1362490576 instance=ExtResource("2_ci2hw")]
unique_name_in_owner = true
[node name="CristalModelCrack1" parent="." unique_id=2936580 instance=ExtResource("3_nvfy2")]
unique_name_in_owner = true
visible = false
[node name="CristalModelCrack2" parent="." unique_id=1202531828 instance=ExtResource("2_vejte")]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0051152706, 0.006559938, -0.011411905)
visible = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1235599731]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9791151, 0)
shape = SubResource("BoxShape3D_nvfy2")
[node name="MutationAnnounce" parent="." unique_id=1447182082 instance=ExtResource("9_247i2")]
unique_name_in_owner = true
[editable path="CristalModelCrack2"]

View File

@@ -0,0 +1,315 @@
[gd_scene format=3 uid="uid://brp1fpvasaims"]
[ext_resource type="Script" uid="uid://c0tyivmiouctw" path="res://entities/interactable_3d/cristal/scripts/mutation_announce.gd" id="1_02o74"]
[ext_resource type="Texture2D" uid="uid://bi5jo6pf0acjb" path="res://common/icons/carambola.svg" id="2_vlom2"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="3_5hs4t"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="4_yg5wk"]
[ext_resource type="Script" uid="uid://bqisp5hjs06rj" path="res://gui/game/announce/scripts/announce_inspectable.gd" id="5_qu1xy"]
[ext_resource type="Texture2D" uid="uid://0hbdgalf04e" path="res://common/icons/wood.svg" id="6_n403s"]
[ext_resource type="Script" uid="uid://dj2pv1hiwjfv0" path="res://gui/game/card/scripts/card_info.gd" id="7_se4h4"]
[ext_resource type="Script" uid="uid://dgbh38j13g5kn" path="res://gui/game/card/scripts/card_section_info.gd" id="8_0osya"]
[ext_resource type="Texture2D" uid="uid://dth2mj0nh2q70" path="res://common/icons/align-right.svg" id="9_s5jxo"]
[ext_resource type="Script" uid="uid://b4tkium34c831" path="res://gui/game/card/scripts/card_stat_info.gd" id="10_qidgp"]
[ext_resource type="Texture2D" uid="uid://bsvxhafoxwmw0" path="res://common/icons/cube-3d-sphere.svg" id="11_uj15c"]
[ext_resource type="PackedScene" uid="uid://mwk845fx5ye2" path="res://entities/interactable_3d/cristal/assets/cristal.blend" id="12_wy2oe"]
[ext_resource type="Environment" uid="uid://bxyp24f85p0xf" path="res://gui/game/assets/gui_3d_environment.tres" id="13_kyl1n"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="14_d2gpy"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="15_hu5cq"]
[sub_resource type="ViewportTexture" id="ViewportTexture_6hxtc"]
viewport_path = NodePath("Particles/SubViewport")
[sub_resource type="Curve" id="Curve_brrmr"]
_limits = [-200.0, 200.0, 0.0, 1.0]
_data = [Vector2(0, -200), 0.0, 560.0, 0, 0, Vector2(0.08235294, 92.384125), 1336.3082, 1336.3082, 0, 0, Vector2(0.34901965, 200), 0.0, 0.0, 0, 0, Vector2(0.854902, -200), 0.0, 0.0, 0, 0]
point_count = 4
[sub_resource type="Gradient" id="Gradient_0u75y"]
offsets = PackedFloat32Array(0, 0.8689956, 0.98253274)
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0)
[sub_resource type="LabelSettings" id="LabelSettings_u8fe7"]
font = ExtResource("4_yg5wk")
font_size = 50
font_color = Color(1, 0.6509804, 0.09019608, 1)
[sub_resource type="ViewportTexture" id="ViewportTexture_smt8b"]
viewport_path = NodePath("AnnounceContainer/ObjectVisualiser/SubViewport")
[sub_resource type="Resource" id="Resource_rjaqi"]
script = ExtResource("8_0osya")
title_text = "Description"
title_icon = ExtResource("9_s5jxo")
text = "Une fois mature, ajoute [b]1[/b][img=22x22]res://common/icons/growth.svg[/img] tous les [b]3[/b][img=22x22]res://common/icons/calendar-week.svg[/img]"
[sub_resource type="Resource" id="Resource_kgj7d"]
script = ExtResource("7_se4h4")
title = "Ancien"
subtitle = "Mutation"
important_stat_icon = ExtResource("6_n403s")
sections = Array[ExtResource("8_0osya")]([SubResource("Resource_rjaqi")])
[sub_resource type="Animation" id="Animation_aao0q"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MutationAnnounce/AnnounceContainer:theme_override_constants/separation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [4]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("MutationAnnounce/Particles:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("MutationAnnounce/AnnounceContainer:modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("MutationAnnounce/MarginContainer/BackgroundRect:modulate:a")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1.0]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("MutationAnnounce:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0.03333333),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_b6hac"]
resource_name = "appear"
length = 0.8
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MutationAnnounce/AnnounceContainer:theme_override_constants/separation")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.23333333, 0.8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [480, 4]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("MutationAnnounce/Particles:modulate")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.5, 0.8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("MutationAnnounce/AnnounceContainer:modulate")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0.2, 0.8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("MutationAnnounce/MarginContainer/BackgroundRect:modulate:a")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0.03333333, 0.8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 0.8]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("MutationAnnounce:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0, 0.16666667),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_1aa3a"]
_data = {
&"RESET": SubResource("Animation_aao0q"),
&"appear": SubResource("Animation_b6hac")
}
[node name="MutationAnnounce" type="CanvasLayer" unique_id=1447182082]
visible = false
script = ExtResource("1_02o74")
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1853133518]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="BackgroundRect" type="ColorRect" parent="MarginContainer" unique_id=1594037653]
layout_mode = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
[node name="Particles" type="TextureRect" parent="." unique_id=1748571879]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -500.0
offset_top = -500.0
offset_right = 500.0
offset_bottom = 500.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource("ViewportTexture_6hxtc")
[node name="SubViewport" type="SubViewport" parent="Particles" unique_id=1123249182]
transparent_bg = true
size = Vector2i(1000, 1000)
[node name="GPUParticles2D" type="CPUParticles2D" parent="Particles/SubViewport" unique_id=220592083]
position = Vector2(500, 500)
amount = 20
texture = ExtResource("2_vlom2")
preprocess = 1.0
spread = 180.0
gravity = Vector2(0, 0)
initial_velocity_min = 2.0
initial_velocity_max = 2.0
linear_accel_min = 5.0
linear_accel_max = 5.0
linear_accel_curve = SubResource("Curve_brrmr")
color_ramp = SubResource("Gradient_0u75y")
[node name="AnnounceContainer" type="VBoxContainer" parent="." unique_id=645433045]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -627.0
offset_bottom = 627.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 4
alignment = 1
[node name="AnnounceTitle" type="Label" parent="AnnounceContainer" unique_id=1768593559]
unique_name_in_owner = true
layout_mode = 2
text = "NEW_MUTATION"
label_settings = ExtResource("3_5hs4t")
horizontal_alignment = 1
[node name="AnnounceText" type="Label" parent="AnnounceContainer" unique_id=768724763]
unique_name_in_owner = true
layout_mode = 2
text = "Ancien"
label_settings = SubResource("LabelSettings_u8fe7")
horizontal_alignment = 1
[node name="ObjectVisualiser" type="TextureRect" parent="AnnounceContainer" unique_id=1180983374]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
mouse_filter = 0
texture = SubResource("ViewportTexture_smt8b")
stretch_mode = 5
script = ExtResource("5_qu1xy")
info = SubResource("Resource_kgj7d")
[node name="MutationIconTextureRect" type="TextureRect" parent="AnnounceContainer/ObjectVisualiser" unique_id=312214951]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -20.0
offset_right = 20.0
offset_bottom = 20.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("6_n403s")
[node name="SubViewport" type="SubViewport" parent="AnnounceContainer/ObjectVisualiser" unique_id=1795775056]
own_world_3d = true
transparent_bg = true
size = Vector2i(300, 300)
[node name="AnnouceObject" type="Node3D" parent="AnnounceContainer/ObjectVisualiser/SubViewport" unique_id=1527573801]
unique_name_in_owner = true
transform = Transform3D(0.9998366, 0, 0, 0, 0.9995686, 0, 0, 0, 0.9996744, 0, 0, 0)
[node name="cristal" parent="AnnounceContainer/ObjectVisualiser/SubViewport/AnnouceObject" unique_id=1362490576 instance=ExtResource("12_wy2oe")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
[node name="Camera3D" type="Camera3D" parent="AnnounceContainer/ObjectVisualiser/SubViewport" unique_id=173755338]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 10)
keep_aspect = 0
current = true
fov = 20.0
[node name="WorldEnvironment" type="WorldEnvironment" parent="AnnounceContainer/ObjectVisualiser/SubViewport" unique_id=1135825303]
environment = ExtResource("13_kyl1n")
[node name="OkButton" type="Button" parent="AnnounceContainer" unique_id=249785792]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
theme = ExtResource("14_d2gpy")
text = "OK"
icon = ExtResource("15_hu5cq")
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1913258839]
unique_name_in_owner = true
root_node = NodePath("../..")
libraries/ = SubResource("AnimationLibrary_1aa3a")

View File

@@ -0,0 +1,45 @@
extends Interactable3D
const MAX_BREAK_LEVEL = 2
signal broken
@export var break_level = 0
func _ready():
update_model()
func click():
if interactable:
clicked.emit()
%BreackAudioPlayer.playing = true
%BreakParticles.emitting = true
break_level += 1
if break_level == MAX_BREAK_LEVEL:
broken.emit()
interactable = false
unlock_mutation()
update_model()
func update_model():
if is_node_ready():
%CristalModel.visible = break_level == 0
%CristalModelCrack1.visible = break_level == 1
%CristalModelCrack2.visible = break_level > 1
if break_level > 1:
%CristalModelCrack2.find_children("AnimationPlayer")[0].play("Break")
func unlock_mutation():
var progression = GameInfo.game_data.progression_data
if progression.mutations_unlocked < len(progression.get_all_mutations()):
var new_mutation : PlantMutation = progression.get_all_mutations()[progression.mutations_unlocked]
progression.mutations_unlocked += 1
get_tree().create_timer(1.).timeout.connect(
func (): %MutationAnnounce.announce_mutation = new_mutation
);

View File

@@ -0,0 +1 @@
uid://dwn3g8c5sa0a2

View File

@@ -0,0 +1,80 @@
@tool
extends CanvasLayer
class_name MutationAnnounce
const DEFAULT_OBJECT_ACCELERATION = Vector2(3,0)
@export var announce_mutation : PlantMutation = null : set = set_announce_mutation
@export_tool_button("Update", "Callable") var update_action = set_announce_mutation
var announce_objects : Array[AnnouceObject] = []
var object_acceleration := Vector2(0,0)
var rotating := false
var prev_mouse_pos : Vector2
var next_mouse_pos : Vector2
const YELLOW_COLOR = Color("e29f32")
const RED_COLOR = Color("f20058")
func _ready():
set_announce_mutation()
%OkButton.button_down.connect(_on_ok_button_down)
hide()
func _process(delta):
update_rotation(delta)
func update_rotation(delta):
if visible:
next_mouse_pos = get_viewport().get_mouse_position()
if Input.is_action_just_pressed("action"):
rotating = true
prev_mouse_pos = get_viewport().get_mouse_position()
if Input.is_action_just_released("action"):
rotating = false
object_acceleration = Vector2(
float(next_mouse_pos.x - prev_mouse_pos.x),
float(next_mouse_pos.y - prev_mouse_pos.y)
)
var object_rotation = object_acceleration
if rotating:
object_rotation = Vector2(
float(next_mouse_pos.x - prev_mouse_pos.x),
float(next_mouse_pos.y - prev_mouse_pos.y)
)
prev_mouse_pos = next_mouse_pos
else :
object_acceleration = object_acceleration.lerp(DEFAULT_OBJECT_ACCELERATION, 0.1)
%AnnouceObject.rotate(Vector3.UP, object_rotation.x * delta)
%AnnouceObject.rotate(Vector3.RIGHT, object_rotation.y * delta)
func set_announce_mutation(mutation := announce_mutation):
if is_node_ready() and mutation:
%AnnounceTitle.text = "NEW_MUTATION"
%AnnounceText.text = mutation.get_mutation_name()
%MutationIconTextureRect.texture = mutation.get_icon()
%ObjectVisualiser.info = mutation.card_info()
if not visible:
%AnimationPlayer.play("appear")
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
AudioManager.play_sfx("Reveal")
elif mutation == null and visible:
%AnimationPlayer.play_backwards("appear")
if not Engine.is_editor_hint():
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
announce_mutation = mutation
func _on_ok_button_down():
announce_mutation = null

View File

@@ -0,0 +1 @@
uid://c0tyivmiouctw