From 879fa714f79310be4bc38971e4c5f6c9900bcee3 Mon Sep 17 00:00:00 2001 From: Paul Norberger Date: Tue, 21 Apr 2020 02:14:31 +0200 Subject: [PATCH] Made a few changes who cares anymore AHHHHH --- src/Menus/Beginnings/Beginnings.gd | 50 ++++++++++++++++++ src/Menus/Beginnings/Beginnings.tscn | 64 +++++++++++++++++++++++ src/Menus/Beginnings/continue.png | Bin 0 -> 593 bytes src/Menus/Beginnings/continue.png.import | 34 ++++++++++++ src/Menus/Credits/Credits.tscn | 6 +-- src/project.godot | 9 +++- 6 files changed, 159 insertions(+), 4 deletions(-) create mode 100644 src/Menus/Beginnings/Beginnings.gd create mode 100644 src/Menus/Beginnings/Beginnings.tscn create mode 100644 src/Menus/Beginnings/continue.png create mode 100644 src/Menus/Beginnings/continue.png.import diff --git a/src/Menus/Beginnings/Beginnings.gd b/src/Menus/Beginnings/Beginnings.gd new file mode 100644 index 0000000..8f768a9 --- /dev/null +++ b/src/Menus/Beginnings/Beginnings.gd @@ -0,0 +1,50 @@ +extends Node2D + +var cur_line = -1 +var text = [ + "Hello, my friend.", + "Sorry, I am a bit shy...", + "But I need your help.", + "Everyday new \"heroes\" come into my chamber", + "and try to kill me.", + "I'm not strong and sometimes I worry", + "they might actually succeed.", + "Please help me defend myself.", + "You can use these cards of mine.", + "And after every hero you defeat", + "I will give you a new one.", + "I will give you multiple options even.", + "So you can choose and collect!", + "Im counting on you!" +] +onready var label = $CanvasLayer/CenterContainer/HBoxContainer/Label +onready var finished_indicator = $CanvasLayer/CenterContainer/HBoxContainer/VBoxContainer/FinishedIndicator + +export(String, FILE, "*.tscn,*.scn") var scene_to_load = "" + + +func _ready(): + next() + +func _physics_process(delta): + if Input.is_action_just_pressed("dialogue_advance"): + next() + +func next(): + finished_indicator.modulate = Color(1, 1, 1, 0) + cur_line += 1 + + if cur_line >= text.size(): + get_tree().change_scene(scene_to_load) + return + + var line = text[cur_line] + + label.text = line + $Tween.interpolate_property(label, "percent_visible", + 0, 1, 0.05 * len(line)) + $Tween.start() + + +func _on_Tween_tween_completed(object, key): + finished_indicator.modulate = Color(1, 1, 1, 1) diff --git a/src/Menus/Beginnings/Beginnings.tscn b/src/Menus/Beginnings/Beginnings.tscn new file mode 100644 index 0000000..952851e --- /dev/null +++ b/src/Menus/Beginnings/Beginnings.tscn @@ -0,0 +1,64 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://Menus/Beginnings/Beginnings.gd" type="Script" id=1] +[ext_resource path="res://Fonts/Harmonic/Harmonic24.tres" type="DynamicFont" id=2] +[ext_resource path="res://Menus/Beginnings/continue.png" type="Texture" id=3] + +[sub_resource type="Animation" id=1] +resource_name = "hover" +length = 1.4 +loop = true +tracks/0/type = "value" +tracks/0/path = NodePath("CanvasLayer/CenterContainer/HBoxContainer/VBoxContainer/FinishedIndicator:anchor_top") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.7 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ 0.0, 0.4 ] +} + +[node name="Beginnings" type="Node2D"] +script = ExtResource( 1 ) +scene_to_load = "res://Menus/TitleScreen/TitleScreen.tscn" + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/CenterContainer"] +margin_left = 234.0 +margin_top = 123.0 +margin_right = 245.0 +margin_bottom = 147.0 + +[node name="Label" type="Label" parent="CanvasLayer/CenterContainer/HBoxContainer"] +margin_bottom = 24.0 +custom_fonts/font = ExtResource( 2 ) + +[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/CenterContainer/HBoxContainer"] +margin_left = 4.0 +margin_right = 11.0 +margin_bottom = 24.0 +alignment = 2 + +[node name="FinishedIndicator" type="TextureRect" parent="CanvasLayer/CenterContainer/HBoxContainer/VBoxContainer"] +margin_top = 18.0 +margin_right = 7.0 +margin_bottom = 24.0 +texture = ExtResource( 3 ) + +[node name="Tween" type="Tween" parent="."] + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +autoplay = "hover" +anims/hover = SubResource( 1 ) +[connection signal="tween_completed" from="Tween" to="." method="_on_Tween_tween_completed"] diff --git a/src/Menus/Beginnings/continue.png b/src/Menus/Beginnings/continue.png new file mode 100644 index 0000000000000000000000000000000000000000..87b5cb11cf562699bac11bb7f9a87b59355c2aeb GIT binary patch literal 593 zcmV-X0EX>4Tx04R}tkv&MmKpe$i(`rR34h9r)$WWauh>AK&6^me@v=v%)FuC+YXws0R zxHt-~1qVMCs}3&Cx;nTDg5U>;lcSTOixTC#OK7LCS8#Dk?Tr>-#8as7I>y;rjv8TBC%9xW2KE*(bR}1iNmUAMub+K6bnh(k9znAU4MdH3b{7G z$T5#HG{~+W{11M2Yvm`#8%d!k(DC9pAHzU!7pPYq=lj@k>L-Bz8MxA0{&EeN`6RvC z(!xhT?>2C8-O`jj;Bp5Tcrs*Db|pVeA)g1{&*+=7K;JFUz1rxlxsTHaAWdB@-2exN zz(|3z*F4_c)!y5`XPW)}0GLj4w!v;8hyVZp24YJ`L;wH)0002_L%V+f000SaNLh0L z04^f{04^f|c%?sf00007bV*G`2jm147dJV*kqGqw000?uMObu0Z*6U5Zgc=ca%Ew3 zWn>_CX>@2HM@dakSAh-}0000eNkl