Ajout de l'amélioration du modèle du robot au cours de l'histoire, d'une annonce sur cette amélioration ainsi qu'un succès à l'utilisation de toutes les incubateurs d'orchid dans une base
This commit is contained in:
@@ -5,12 +5,49 @@
|
||||
[ext_resource type="Texture2D" uid="uid://cdpqg3pkjcw2h" path="res://stages/title_screen/assets/textures/title.png" id="3_urbel"]
|
||||
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="4_5k6jv"]
|
||||
[ext_resource type="PackedScene" uid="uid://c8flevrkelpvy" path="res://gui/credits/socials/instagram.tscn" id="5_urbel"]
|
||||
[ext_resource type="Texture2D" uid="uid://bcjkds8n5qu6x" path="res://common/icons/rotate-rectangle.svg" id="6_5k6jv"]
|
||||
[ext_resource type="PackedScene" uid="uid://cm5b7w7j6527f" path="res://stages/title_screen/planet_3d.tscn" id="6_luv2b"]
|
||||
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="7_urbel"]
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_urbel"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_kip8e"]
|
||||
bg_color = Color(1, 0.6509804, 0.09019608, 1)
|
||||
border_width_left = 6
|
||||
border_width_top = 6
|
||||
border_width_right = 6
|
||||
border_width_bottom = 6
|
||||
border_color = Color(1, 0.6509804, 0.09019608, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a8ny4"]
|
||||
bg_color = Color(0.692349, 0.477218, 0.112321, 1)
|
||||
border_width_left = 6
|
||||
border_width_top = 6
|
||||
border_width_right = 6
|
||||
border_width_bottom = 6
|
||||
border_color = Color(0.694118, 0.478431, 0.113725, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xl2r5"]
|
||||
bg_color = Color(0.976471, 0.741176, 0.4, 1)
|
||||
border_width_left = 6
|
||||
border_width_top = 6
|
||||
border_width_right = 6
|
||||
border_width_bottom = 6
|
||||
border_color = Color(0.975367, 0.740445, 0.401877, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_5k6jv"]
|
||||
font = ExtResource("7_urbel")
|
||||
font_size = 20
|
||||
@@ -234,8 +271,21 @@ label_settings = ExtResource("4_5k6jv")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Button" parent="MarginContainer/GridContainer/VBoxContainer" unique_id=927302743 instance=ExtResource("5_urbel")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TitleScreen" type="Button" parent="MarginContainer/GridContainer/VBoxContainer" unique_id=1912426702]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme = ExtResource("2_luv2b")
|
||||
theme_override_constants/icon_max_width = 30
|
||||
theme_override_font_sizes/font_size = 20
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_kip8e")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_a8ny4")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_xl2r5")
|
||||
text = "RETURN_TO_TITLE_SCREEN"
|
||||
icon = ExtResource("6_5k6jv")
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="MarginContainer/GridContainer" unique_id=105267250]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
@@ -435,7 +485,7 @@ alignment = 1
|
||||
|
||||
[node name="Name" type="Label" parent="MarginContainer/GridContainer/VBoxContainer2/CreditsLine12" unique_id=2037812278]
|
||||
layout_mode = 2
|
||||
text = "Cesire"
|
||||
text = "Cesire / ItsATreee on Twitch"
|
||||
label_settings = SubResource("LabelSettings_5k6jv")
|
||||
horizontal_alignment = 1
|
||||
|
||||
@@ -472,3 +522,5 @@ shadow_enabled = true
|
||||
shadow_normal_bias = 0.0
|
||||
shadow_opacity = 0.92
|
||||
shadow_blur = 4.667
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/GridContainer/VBoxContainer/TitleScreen" to="." method="_on_title_screen_pressed"]
|
||||
|
||||
@@ -2,4 +2,8 @@ extends CanvasLayer
|
||||
class_name Credits
|
||||
|
||||
func appear():
|
||||
%AnimationPlayer.play("appear")
|
||||
%AnimationPlayer.play("appear")
|
||||
|
||||
func _on_title_screen_pressed():
|
||||
SceneManager.change_to_scene(TitleScene.new(), false)
|
||||
|
||||
|
||||
@@ -22,11 +22,6 @@ point_count = 4
|
||||
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_6qyp1"]
|
||||
font = ExtResource("4_aao0q")
|
||||
font_size = 50
|
||||
font_color = Color(1, 0.6509804, 0.09019608, 1)
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_aao0q"]
|
||||
viewport_path = NodePath("AnnounceContainer/HBoxContainer/ObjectVisualiser/SubViewport")
|
||||
|
||||
@@ -227,11 +222,22 @@ text = "NEW_TOOL"
|
||||
label_settings = ExtResource("3_7nrno")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="AnnounceText" type="Label" parent="AnnounceContainer" unique_id=1537255164]
|
||||
[node name="AnnounceText" type="RichTextLabel" parent="AnnounceContainer" unique_id=1992702255]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/default_color = Color(1, 0.6509804, 0.08627451, 1)
|
||||
theme_override_fonts/normal_font = ExtResource("4_aao0q")
|
||||
theme_override_fonts/bold_font = ExtResource("4_aao0q")
|
||||
theme_override_fonts/bold_italics_font = ExtResource("4_aao0q")
|
||||
theme_override_fonts/italics_font = ExtResource("4_aao0q")
|
||||
theme_override_font_sizes/normal_font_size = 50
|
||||
theme_override_font_sizes/bold_font_size = 60
|
||||
theme_override_font_sizes/bold_italics_font_size = 50
|
||||
theme_override_font_sizes/italics_font_size = 50
|
||||
theme_override_font_sizes/mono_font_size = 50
|
||||
bbcode_enabled = true
|
||||
text = "Pelle"
|
||||
label_settings = SubResource("LabelSettings_6qyp1")
|
||||
fit_content = true
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="GridContainer" parent="AnnounceContainer" unique_id=802355154]
|
||||
@@ -279,11 +285,12 @@ own_world_3d = true
|
||||
transparent_bg = true
|
||||
size = Vector2i(300, 300)
|
||||
|
||||
[node name="AnnouceObject" type="Node3D" parent="AnnounceContainer/HBoxContainer/ObjectVisualiser/SubViewport" unique_id=986671004]
|
||||
[node name="AnnounceObject" type="Node3D" parent="AnnounceContainer/HBoxContainer/ObjectVisualiser/SubViewport" unique_id=986671004]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-0.054461285, 0.73170173, 0.6795513, -0.8508927, 0.32199714, -0.4149924, -0.52245957, -0.6008157, 0.60510355, 0, 0, 0)
|
||||
transform = Transform3D(0.9687702, -0.030383619, -0.24602485, -0.11000262, 0.83650446, -0.53682446, 0.22209063, 0.54715794, 0.8071189, 0, 0, 0)
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="AnnounceContainer/HBoxContainer/ObjectVisualiser/SubViewport" unique_id=1788331074]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1)
|
||||
keep_aspect = 0
|
||||
current = true
|
||||
|
||||
@@ -4,11 +4,11 @@ class_name Announce
|
||||
|
||||
const DEFAULT_OBJECT_ACCELERATION = Vector2(3,0)
|
||||
|
||||
@export var announce_object : AnnouceObject = null : set = set_announce_object
|
||||
@export var announce_object : AnnounceObject = null : set = set_announce_object
|
||||
|
||||
@export_tool_button("Update", "Callable") var update_action = set_announce_object
|
||||
|
||||
var announce_objects : Array[AnnouceObject] = []
|
||||
var announce_objects : Array[AnnounceObject] = []
|
||||
|
||||
var object_acceleration := Vector2(0,0)
|
||||
|
||||
@@ -33,6 +33,26 @@ func _ready():
|
||||
GameInfo.game_data.item_announced.append(i.name)
|
||||
)
|
||||
|
||||
if (
|
||||
GameInfo.game_data.max_energy_announced != GameInfo.game_data.player_data.max_energy
|
||||
):
|
||||
announce_objects.append(AnnounceModel.new(
|
||||
tr("UPGRADED_MAX_ENERGY_TO_%d") % GameInfo.game_data.player_data.max_energy
|
||||
))
|
||||
GameInfo.game_data.max_energy_announced = GameInfo.game_data.player_data.max_energy
|
||||
|
||||
if (
|
||||
GameInfo.game_data.max_inventory_announced != GameInfo.game_data.player_data.inventory.seeds_size
|
||||
):
|
||||
announce_objects.append(AnnounceModel.new(
|
||||
tr("UPGRADED_INVENTORY_SIZE_TO_%d") % GameInfo.game_data.player_data.inventory.seeds_size
|
||||
))
|
||||
GameInfo.game_data.max_inventory_announced = GameInfo.game_data.player_data.inventory.seeds_size
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if announce_object == null and not visible and len(announce_objects) > 0:
|
||||
announce_object = announce_objects.pop_front()
|
||||
@@ -71,18 +91,20 @@ func update_rotation(delta):
|
||||
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)
|
||||
%AnnounceObject.rotate(Vector3.UP, object_rotation.x * delta)
|
||||
%AnnounceObject.rotate(Vector3.RIGHT, object_rotation.y * delta)
|
||||
|
||||
|
||||
func set_announce_object(object := announce_object):
|
||||
Pointer.action_disabled = not object
|
||||
if is_node_ready() and object:
|
||||
for children in %AnnouceObject.get_children():
|
||||
for children in %AnnounceObject.get_children():
|
||||
children.queue_free()
|
||||
|
||||
%AnnouceObject.add_child(object.get_3d_object())
|
||||
%AnnouceObject.rotation = Vector3.ZERO
|
||||
%Camera3D.position.z = object.get_camera_z_pos()
|
||||
|
||||
%AnnounceObject.add_child(object.get_3d_object())
|
||||
%AnnounceObject.rotation = Vector3.ZERO
|
||||
%AnnounceTitle.text = object.get_title()
|
||||
%AnnounceText.text = object.get_text()
|
||||
%AnnounceDesc.text = object.get_desc()
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
@tool
|
||||
extends AnnounceObject
|
||||
class_name AnnounceModel
|
||||
|
||||
const ORCHID_3D_SCENE = preload("res://entities/player_3d/resources/3d_orchid.blend")
|
||||
|
||||
@export var text : String
|
||||
|
||||
|
||||
func _init(
|
||||
_text := text
|
||||
):
|
||||
text = _text
|
||||
|
||||
func get_3d_object() -> Node3D:
|
||||
return ORCHID_3D_SCENE.instantiate()
|
||||
|
||||
func get_title() -> String:
|
||||
return "MODEL_HAS_BEEN_UPGRADED"
|
||||
|
||||
func get_text() -> String:
|
||||
return text
|
||||
|
||||
func get_camera_z_pos() -> float:
|
||||
return 5.
|
||||
|
||||
func get_card_info() -> CardInfo:
|
||||
return null
|
||||
|
||||
func _on_dismiss():
|
||||
pass
|
||||
# GameInfo.game_data.player_data.tool_discovered.append(tool_item.get_item_name())
|
||||
@@ -0,0 +1 @@
|
||||
uid://dnemq1wa14s8g
|
||||
+4
-1
@@ -1,6 +1,6 @@
|
||||
@abstract
|
||||
extends Resource
|
||||
class_name AnnouceObject
|
||||
class_name AnnounceObject
|
||||
|
||||
var desc := ""
|
||||
var image : Texture = null
|
||||
@@ -17,6 +17,9 @@ func get_desc() -> String:
|
||||
func get_image() -> Texture:
|
||||
return image
|
||||
|
||||
func get_camera_z_pos() -> float:
|
||||
return 1.0
|
||||
|
||||
@abstract func get_card_info() -> CardInfo
|
||||
|
||||
@abstract func _on_dismiss()
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
@tool
|
||||
extends AnnouceObject
|
||||
extends AnnounceObject
|
||||
class_name AnnounceTool
|
||||
|
||||
const ITEM_3D_SCENE = preload("res://gui/game/inventory_gui/inventory_item/inventory_item_3d.tscn")
|
||||
Reference in New Issue
Block a user