fix post-proto
* ajout d'un fondu de musique au changement de phase * résolution de bugs en tout genre
This commit is contained in:
@@ -1,60 +1,55 @@
|
||||
[gd_scene load_steps=22 format=3 uid="uid://3ss8pvhsackj"]
|
||||
[gd_scene load_steps=21 format=3 uid="uid://3ss8pvhsackj"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://753270jjxmfg" path="res://gui/game/card/card.tscn" id="1_we78f"]
|
||||
[ext_resource type="Shader" uid="uid://bqjwmomh851lc" path="res://common/vfx/materials/shaders/skew.gdshader" id="1_x54se"]
|
||||
[ext_resource type="Texture2D" uid="uid://0hbdgalf04e" path="res://common/icons/wood.svg" id="2_bw03i"]
|
||||
[ext_resource type="Script" uid="uid://dj5pld5ragrjp" path="res://gui/game/card/scripts/card_visualiser.gd" id="2_ntbk8"]
|
||||
[ext_resource type="Script" uid="uid://dj2pv1hiwjfv0" path="res://gui/game/card/scripts/card_info.gd" id="3_5yk1o"]
|
||||
[ext_resource type="Texture2D" uid="uid://bd6qddv5ihkjr" path="res://common/icons/bucket.svg" id="3_r0jrf"]
|
||||
[ext_resource type="Script" uid="uid://dgbh38j13g5kn" path="res://gui/game/card/scripts/card_section_info.gd" id="4_7xkgc"]
|
||||
[ext_resource type="Script" uid="uid://b4tkium34c831" path="res://gui/game/card/scripts/card_stat_info.gd" id="5_1et8x"]
|
||||
[ext_resource type="Texture2D" uid="uid://cgefjpkvs8noj" path="res://common/icons/copy.svg" id="5_lj1tr"]
|
||||
[ext_resource type="Texture2D" uid="uid://bsvxhafoxwmw0" path="res://common/icons/cube-3d-sphere.svg" id="7_1et8x"]
|
||||
[ext_resource type="Texture2D" uid="uid://df0y0s666ui4h" path="res://icon.png" id="7_6vah0"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_r0jrf"]
|
||||
shader = ExtResource("1_x54se")
|
||||
shader_parameter/fov = 90.0
|
||||
shader_parameter/cull_back = true
|
||||
shader_parameter/y_rot = -6e-45
|
||||
shader_parameter/x_rot = -6e-45
|
||||
shader_parameter/inset = 0.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_r0jrf"]
|
||||
script = ExtResource("4_7xkgc")
|
||||
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_6vah0"]
|
||||
script = ExtResource("4_7xkgc")
|
||||
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_jjqcm"]
|
||||
script = ExtResource("4_7xkgc")
|
||||
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_lj1tr"]
|
||||
script = ExtResource("4_7xkgc")
|
||||
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_vabmf"]
|
||||
script = ExtResource("4_7xkgc")
|
||||
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1vjtn"]
|
||||
script = ExtResource("4_7xkgc")
|
||||
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||
[ext_resource type="Texture2D" uid="uid://baaujfw8piywi" path="res://common/icons/dna.svg" id="7_vabmf"]
|
||||
[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="8_1vjtn"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_l3vvu"]
|
||||
script = ExtResource("4_7xkgc")
|
||||
title_text = "Very nice section"
|
||||
title_icon = ExtResource("5_lj1tr")
|
||||
text = "It's a very nice section with a very nice text"
|
||||
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_bw03i"]
|
||||
[sub_resource type="Resource" id="Resource_biqg7"]
|
||||
script = ExtResource("5_1et8x")
|
||||
text = "Dna"
|
||||
icon = ExtResource("7_vabmf")
|
||||
metadata/_custom_type_script = "uid://b4tkium34c831"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gskac"]
|
||||
script = ExtResource("5_1et8x")
|
||||
text = "Growth"
|
||||
icon = ExtResource("8_1vjtn")
|
||||
metadata/_custom_type_script = "uid://b4tkium34c831"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_eb1v6"]
|
||||
script = ExtResource("3_5yk1o")
|
||||
title = "Hello"
|
||||
texture = ExtResource("7_6vah0")
|
||||
important_stat_text = "6"
|
||||
important_stat_icon = ExtResource("3_r0jrf")
|
||||
sections = Array[ExtResource("4_7xkgc")]([SubResource("Resource_r0jrf"), SubResource("Resource_6vah0"), SubResource("Resource_jjqcm"), SubResource("Resource_lj1tr"), SubResource("Resource_vabmf"), SubResource("Resource_1vjtn"), SubResource("Resource_l3vvu")])
|
||||
important_stat_text = "5"
|
||||
important_stat_icon = ExtResource("2_bw03i")
|
||||
stats = Array[ExtResource("5_1et8x")]([SubResource("Resource_biqg7"), SubResource("Resource_gskac")])
|
||||
sections = Array[ExtResource("4_7xkgc")]([SubResource("Resource_l3vvu")])
|
||||
metadata/_custom_type_script = "uid://dj2pv1hiwjfv0"
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_bw03i"]
|
||||
shader = ExtResource("1_x54se")
|
||||
shader_parameter/fov = 90.0
|
||||
shader_parameter/cull_back = true
|
||||
shader_parameter/y_rot = 0.00018062632
|
||||
shader_parameter/x_rot = -0.00042293756
|
||||
shader_parameter/inset = 0.0
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1et8x"]
|
||||
length = 0.3
|
||||
|
||||
@@ -68,27 +63,35 @@ _data = {
|
||||
&"appear": SubResource("Animation_7xkgc")
|
||||
}
|
||||
|
||||
[node name="CardVisualiser" type="SubViewportContainer"]
|
||||
material = SubResource("ShaderMaterial_r0jrf")
|
||||
[node name="CardVisualiser" type="MarginContainer"]
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -246.0
|
||||
offset_top = -134.0
|
||||
offset_right = 54.0
|
||||
offset_bottom = -24.0
|
||||
offset_left = -125.0
|
||||
offset_top = -30.0
|
||||
offset_right = 125.0
|
||||
offset_bottom = 30.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
scale = Vector2(1.0000002, 1.0000002)
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 4
|
||||
mouse_filter = 2
|
||||
theme_override_constants/margin_left = -25
|
||||
theme_override_constants/margin_top = -25
|
||||
theme_override_constants/margin_right = -25
|
||||
theme_override_constants/margin_bottom = -25
|
||||
script = ExtResource("2_ntbk8")
|
||||
card_info = SubResource("Resource_bw03i")
|
||||
card_info = SubResource("Resource_eb1v6")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="."]
|
||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
material = SubResource("ShaderMaterial_bw03i")
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
|
||||
unique_name_in_owner = true
|
||||
transparent_bg = true
|
||||
handle_input_locally = false
|
||||
@@ -96,7 +99,7 @@ size = Vector2i(300, 110)
|
||||
size_2d_override_stretch = true
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="CardContainer" type="MarginContainer" parent="SubViewport"]
|
||||
[node name="CardContainer" type="MarginContainer" parent="SubViewportContainer/SubViewport"]
|
||||
unique_name_in_owner = true
|
||||
offset_right = 300.0
|
||||
offset_bottom = 110.0
|
||||
@@ -105,15 +108,14 @@ theme_override_constants/margin_top = 25
|
||||
theme_override_constants/margin_right = 25
|
||||
theme_override_constants/margin_bottom = 25
|
||||
|
||||
[node name="Card" parent="SubViewport/CardContainer" instance=ExtResource("1_we78f")]
|
||||
[node name="Card" parent="SubViewportContainer/SubViewport/CardContainer" instance=ExtResource("1_we78f")]
|
||||
unique_name_in_owner = true
|
||||
self_modulate = Color(1, 1, 1, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
mouse_filter = 2
|
||||
small_mode = true
|
||||
down_arrow = true
|
||||
info = SubResource("Resource_bw03i")
|
||||
info = SubResource("Resource_eb1v6")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@tool
|
||||
extends SubViewportContainer
|
||||
extends MarginContainer
|
||||
class_name CardVisualiser
|
||||
|
||||
signal clicked(c: CardVisualiser)
|
||||
@@ -7,6 +7,8 @@ signal clicked(c: CardVisualiser)
|
||||
const MAX_ROT = 15
|
||||
const ZOOM_SCALE = 1.2
|
||||
|
||||
const MARGIN = 25
|
||||
|
||||
var wanted_rot : Vector2 = Vector2.ZERO
|
||||
var real_rot : Vector2 = Vector2.ZERO
|
||||
|
||||
@@ -51,7 +53,7 @@ func _input(event):
|
||||
clicked.emit(self)
|
||||
|
||||
func _ready():
|
||||
material = material.duplicate()
|
||||
%SubViewportContainer.material = %SubViewportContainer.material.duplicate()
|
||||
update()
|
||||
is_ready = true
|
||||
|
||||
@@ -69,13 +71,14 @@ func _process(_d):
|
||||
|
||||
real_rot = real_rot.lerp(wanted_rot, 0.1)
|
||||
|
||||
material.set_shader_parameter("y_rot", - real_rot.x)
|
||||
material.set_shader_parameter("x_rot", real_rot.y)
|
||||
%SubViewportContainer.material.set_shader_parameter("y_rot", - real_rot.x)
|
||||
%SubViewportContainer.material.set_shader_parameter("x_rot", real_rot.y)
|
||||
|
||||
%Card.custom_minimum_size.x = card_width
|
||||
%CardContainer.size.y = 0
|
||||
%CardContainer.size = Vector2.ZERO
|
||||
%SubViewport.size = %CardContainer.size
|
||||
size = %SubViewport.size
|
||||
%SubViewportContainer.size = %SubViewport.size
|
||||
size = %SubViewportContainer.size - (Vector2.ONE * MARGIN * 2)
|
||||
|
||||
|
||||
func is_mouse_over() -> bool:
|
||||
|
||||
@@ -165,6 +165,19 @@ texture = ExtResource("3_m0ja8")
|
||||
expand_mode = 1
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="ParticleTexture2" type="TextureRect" parent="CenterContainer/ItemTexture"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -22.0
|
||||
offset_right = 22.0
|
||||
grow_vertical = 0
|
||||
texture = ExtResource("3_m0ja8")
|
||||
expand_mode = 1
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="BottomSpace" type="Control" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
|
||||
@@ -39,12 +39,16 @@ func update(_item: Item, selected : bool):
|
||||
if item and item.icon:
|
||||
%ItemTexture.texture = item.icon
|
||||
var particles = item.get_particles()
|
||||
if len(particles):
|
||||
if len(particles) > 0:
|
||||
%ParticleTexture.texture = particles[0].texture
|
||||
%ParticleTexture.modulate = particles[0].color
|
||||
if len(particles) > 1:
|
||||
%ParticleTexture2.texture = particles[1].texture
|
||||
%ParticleTexture2.modulate = particles[1].color
|
||||
%ItemTexture.visible = item != null
|
||||
%NoItemTextureRect.visible = item == null
|
||||
%ParticleTexture.visible = item and len(item.get_particles())
|
||||
%ParticleTexture.visible = item and len(item.get_particles())>0
|
||||
%ParticleTexture2.visible = item and len(item.get_particles())>1
|
||||
|
||||
|
||||
current_item = item
|
||||
|
||||
@@ -15,10 +15,12 @@ func _ready():
|
||||
|
||||
func show_rewards():
|
||||
showing_rewards = true
|
||||
get_tree().paused = true
|
||||
%AnimationPlayer.play("show")
|
||||
|
||||
func hide_rewards():
|
||||
showing_rewards = false
|
||||
get_tree().paused = false
|
||||
%AnimationPlayer.play_backwards("show")
|
||||
|
||||
func generate_rewards(nb : int = 3):
|
||||
|
||||
@@ -70,7 +70,7 @@ func _on_plant_gaining_score(plant: Plant, amount : int):
|
||||
0.8
|
||||
)
|
||||
|
||||
await get_tree().create_timer(0.3).timeout
|
||||
await get_tree().create_timer(0.3 / max(1,i)).timeout
|
||||
|
||||
func spawn_score_particle(
|
||||
from_position,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends Control
|
||||
|
||||
const PLANET_RUN_SCENE = preload("res://stages/planet_run/planet_run.tscn")
|
||||
@export_file var game_scene_path : String
|
||||
|
||||
func _ready():
|
||||
visible = false
|
||||
@@ -13,7 +13,7 @@ func win(planet : Planet):
|
||||
func _on_restart_pressed():
|
||||
GameInfo.game_data.reset_all()
|
||||
get_tree().paused = false
|
||||
get_tree().change_scene_to_packed(PLANET_RUN_SCENE)
|
||||
get_tree().change_scene_to_file(game_scene_path)
|
||||
|
||||
func _on_quit_pressed():
|
||||
get_tree().quit()
|
||||
|
||||
@@ -27,6 +27,7 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_sehw2")
|
||||
game_scene_path = "uid://d28cp7a21kwou"
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
material = SubResource("ShaderMaterial_8p3aj")
|
||||
|
||||
Reference in New Issue
Block a user