-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
472 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
extends Control | ||
|
||
func _ready(): | ||
$AnimationPlayer.play("Text") | ||
|
||
|
||
func goto_next(): | ||
get_tree().change_scene_to_file("res://Scenes/Dialog/cutscene_2_5.tscn") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
extends Control | ||
|
||
@onready var fotoPessoaTextureRect : TextureRect = $NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer/FotoPessoa | ||
@onready var textoTela : RichTextLabel = $NinePatchRect/MarginContainer/HBoxContainer/MarginContainer/Texto | ||
@onready var tituloPessoa : Label = $NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer/NomePessoa | ||
@export var nextScene : PackedScene | ||
|
||
@export var fotos : Array | ||
|
||
#fotos | ||
enum { | ||
CAP=0, | ||
SL1=1, | ||
SL2=2 | ||
} | ||
|
||
|
||
var can_go_to_next : bool = true | ||
|
||
var dialogos = [ | ||
Dialogo.new(CAP, "Natal foi tomada! Estamos sendo atacados de todas as frentes, defendam-se soldados! Não nos renderemos!!", "Capitão Mor Gouveia"), | ||
Dialogo.new(SL1, "Oh céus… Aquilo ali nas dunas é um bombardeiro? Deus nos proteja.", "Soldado"), | ||
] | ||
|
||
var curr_dialogo = 0 | ||
|
||
|
||
func _ready(): | ||
$AnimationPlayer.play("intro") | ||
|
||
func _input(_event): | ||
if Input.is_action_just_pressed("interact") or Input.is_action_just_pressed("ui_accept") or Input.is_action_just_pressed("primary"): | ||
if $AnimationPlayer.is_playing(): | ||
$AnimationPlayer.advance(10) | ||
else: | ||
curr_dialogo += 1 | ||
playDialogos() | ||
|
||
|
||
func playDialogos(): | ||
if curr_dialogo >= dialogos.size(): | ||
get_tree().change_scene_to_packed(nextScene) | ||
return | ||
playText(dialogos[curr_dialogo].foto, dialogos[curr_dialogo].texto, dialogos[curr_dialogo].titulo) | ||
|
||
|
||
func playText(fotoPessoa : int, texto: String, titulo : String): | ||
textoTela.text = texto | ||
fotoPessoaTextureRect.texture = fotos[fotoPessoa] | ||
tituloPessoa.text = titulo | ||
$AnimationPlayer.play("new_animation") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
[gd_scene load_steps=5 format=3 uid="uid://bb28sae163k2m"] | ||
|
||
[ext_resource type="Script" path="res://Code/Dialog/cap_2_5_prologo.gd" id="1_ehbs6"] | ||
|
||
[sub_resource type="Animation" id="Animation_3fj83"] | ||
length = 0.001 | ||
tracks/0/type = "value" | ||
tracks/0/imported = false | ||
tracks/0/enabled = true | ||
tracks/0/path = NodePath(".:visible_ratio") | ||
tracks/0/interp = 1 | ||
tracks/0/loop_wrap = true | ||
tracks/0/keys = { | ||
"times": PackedFloat32Array(0), | ||
"transitions": PackedFloat32Array(1), | ||
"update": 0, | ||
"values": [1.0] | ||
} | ||
tracks/1/type = "value" | ||
tracks/1/imported = false | ||
tracks/1/enabled = true | ||
tracks/1/path = NodePath(".:visible") | ||
tracks/1/interp = 1 | ||
tracks/1/loop_wrap = true | ||
tracks/1/keys = { | ||
"times": PackedFloat32Array(0), | ||
"transitions": PackedFloat32Array(1), | ||
"update": 1, | ||
"values": [true] | ||
} | ||
|
||
[sub_resource type="Animation" id="Animation_117ic"] | ||
resource_name = "Text" | ||
length = 6.0 | ||
tracks/0/type = "value" | ||
tracks/0/imported = false | ||
tracks/0/enabled = true | ||
tracks/0/path = NodePath(".:visible_ratio") | ||
tracks/0/interp = 1 | ||
tracks/0/loop_wrap = true | ||
tracks/0/keys = { | ||
"times": PackedFloat32Array(0, 3.3), | ||
"transitions": PackedFloat32Array(1, 1), | ||
"update": 0, | ||
"values": [0.0, 1.0] | ||
} | ||
tracks/1/type = "value" | ||
tracks/1/imported = false | ||
tracks/1/enabled = true | ||
tracks/1/path = NodePath(".:visible") | ||
tracks/1/interp = 1 | ||
tracks/1/loop_wrap = true | ||
tracks/1/keys = { | ||
"times": PackedFloat32Array(0, 7), | ||
"transitions": PackedFloat32Array(1, 1), | ||
"update": 1, | ||
"values": [true, false] | ||
} | ||
tracks/2/type = "value" | ||
tracks/2/imported = false | ||
tracks/2/enabled = true | ||
tracks/2/path = NodePath(".:modulate") | ||
tracks/2/interp = 1 | ||
tracks/2/loop_wrap = true | ||
tracks/2/keys = { | ||
"times": PackedFloat32Array(4.8, 5.6), | ||
"transitions": PackedFloat32Array(1, 1), | ||
"update": 0, | ||
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)] | ||
} | ||
tracks/3/type = "method" | ||
tracks/3/imported = false | ||
tracks/3/enabled = true | ||
tracks/3/path = NodePath("../..") | ||
tracks/3/interp = 1 | ||
tracks/3/loop_wrap = true | ||
tracks/3/keys = { | ||
"times": PackedFloat32Array(6), | ||
"transitions": PackedFloat32Array(1), | ||
"values": [{ | ||
"args": [], | ||
"method": &"goto_next" | ||
}] | ||
} | ||
|
||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_rstvp"] | ||
_data = { | ||
"RESET": SubResource("Animation_3fj83"), | ||
"Text": SubResource("Animation_117ic") | ||
} | ||
|
||
[node name="Cap2Prologo" type="Control"] | ||
layout_mode = 3 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
script = ExtResource("1_ehbs6") | ||
|
||
[node name="CenterContainer" type="CenterContainer" parent="."] | ||
layout_mode = 1 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
|
||
[node name="Label" type="Label" parent="CenterContainer"] | ||
layout_mode = 2 | ||
theme_override_colors/font_color = Color(0.835294, 0.235294, 0.415686, 1) | ||
theme_override_colors/font_shadow_color = Color(1, 0.509804, 0.454902, 1) | ||
theme_override_font_sizes/font_size = 50 | ||
text = "Natal, 10 de dezembro de 1633 | ||
Forte dos Reis Magos" | ||
horizontal_alignment = 1 | ||
|
||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] | ||
root_node = NodePath("../CenterContainer/Label") | ||
libraries = { | ||
"": SubResource("AnimationLibrary_rstvp") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
extends Control | ||
|
||
|
||
|
||
func _ready(): | ||
$AnimationPlayer.play("Text") | ||
|
||
|
||
func goto_next(): | ||
get_tree().change_scene_to_file("res://Scenes/Dialog/cutscene_2.tscn") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.