Диалог Ивана в первый день, и некоторые исправления чата.

This commit is contained in:
Евгений Титаренко 2024-08-25 09:34:11 +03:00
parent 8fb7c44343
commit ac3e2ffd62
5 changed files with 6 additions and 18 deletions

View file

@ -125,7 +125,6 @@ offset_bottom = 75.0
clip_contents = true
layout_mode = 0
offset_right = 100.0
offset_bottom = 220.0
theme_override_styles/panel = SubResource("StyleBoxFlat_5af0i")
[node name="ChatLogContainer" type="VBoxContainer" parent="Camera2D/Control/Control/PanelContainer2"]
@ -134,24 +133,11 @@ theme_override_constants/separation = 0
script = ExtResource("4_tbl72")
[node name="PlaceholderDialog" parent="Camera2D/Control/Control/PanelContainer2/ChatLogContainer" instance=ExtResource("4_owmws")]
visible = false
layout_mode = 2
[node name="PlaceholderDialog2" parent="Camera2D/Control/Control/PanelContainer2/ChatLogContainer" instance=ExtResource("4_owmws")]
layout_mode = 2
Text = "Placeholder text 2"
Author = "NPC name 2"
[node name="PlaceholderDialog3" parent="Camera2D/Control/Control/PanelContainer2/ChatLogContainer" instance=ExtResource("4_owmws")]
layout_mode = 2
Text = "Placeholder text 2"
Author = "NPC name 2"
[node name="PlaceholderDialog4" parent="Camera2D/Control/Control/PanelContainer2/ChatLogContainer" instance=ExtResource("4_owmws")]
layout_mode = 2
Text = "Placeholder text 2"
Author = "NPC name 2"
[node name="PlaceholderDialog5" parent="Camera2D/Control/Control/PanelContainer2/ChatLogContainer" instance=ExtResource("4_owmws")]
visible = false
layout_mode = 2
Text = "Placeholder text 2"
Author = "NPC name 2"

View file

@ -11,7 +11,7 @@ config_version=5
[application]
config/name="chill-jam-10"
run/main_scene="res://scenes/test.tscn"
run/main_scene="res://scenes/Day1.tscn"
config/features=PackedStringArray("4.3", "C#", "GL Compatibility")
config/icon="res://icon.svg"

View file

@ -192,6 +192,8 @@ Frames = ExtResource("6_vd74o")
position = Vector2(1307, 254)
NPCName = "Ivan"
Frames = ExtResource("7_j5wfn")
DefaultDialogLine = "New day new joke"
DialogLines = ["Do you want to hear a joke?", "Two inmates are sitting in the cell.", "And one asks another:", "\"How did you get here?\"", "\"I opened a window on a work\"", "\"BS they don't jail people for that!", "Where did you work?\"", "\"I work on the submarine\"", "HAHAHA HA", "Nevermind. Get to the sonar room.", "Eugene want to see you."]
[node name="Eugene" parent="NPCs" instance=ExtResource("3_t4e54")]
position = Vector2(1326, 14)

View file

@ -33,7 +33,6 @@ public partial class ChatLogContainer : VBoxContainer
}
private const float MaxChatLogContainerSize = 200;
private Vector2 _initialPosition;
// Called when the node enters the scene tree for the first time.

View file

@ -214,6 +214,7 @@ public partial class Player : CharacterBody2D
msg.Text = npc.Message;
msg.Author = npc.NPCName;
_chatLogContainer.AddChild(msg);
_chatLogContainer.CurrentState = ChatLogContainer.ChatState.Default;
if (npc.IsDialogEnded) CurrentState = State.ReadChat;
}