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:
@@ -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