mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-11 21:22:22 +02:00
Merge pull request #14 from creyD/dev-music
Made a few changes who cares anymore AHHHHH
This commit is contained in:
50
src/Menus/Beginnings/Beginnings.gd
Normal file
50
src/Menus/Beginnings/Beginnings.gd
Normal file
@@ -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)
|
||||||
64
src/Menus/Beginnings/Beginnings.tscn
Normal file
64
src/Menus/Beginnings/Beginnings.tscn
Normal file
@@ -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"]
|
||||||
BIN
src/Menus/Beginnings/continue.png
Normal file
BIN
src/Menus/Beginnings/continue.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 593 B |
34
src/Menus/Beginnings/continue.png.import
Normal file
34
src/Menus/Beginnings/continue.png.import
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/continue.png-fdca1d30b2229e38e604d7daef107d6e.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Menus/Beginnings/continue.png"
|
||||||
|
dest_files=[ "res://.import/continue.png-fdca1d30b2229e38e604d7daef107d6e.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_mode=0
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
flags/repeat=0
|
||||||
|
flags/filter=false
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=false
|
||||||
|
svg/scale=1.0
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
[sub_resource type="Animation" id=1]
|
[sub_resource type="Animation" id=1]
|
||||||
resource_name = "scroll"
|
resource_name = "scroll"
|
||||||
length = 15.504
|
length = 20.0
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/path = NodePath("Label:margin_top")
|
tracks/0/path = NodePath("Label:margin_top")
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
@@ -13,7 +13,7 @@ tracks/0/loop_wrap = true
|
|||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
tracks/0/enabled = true
|
tracks/0/enabled = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
"times": PoolRealArray( 0, 15.4 ),
|
"times": PoolRealArray( 0, 20 ),
|
||||||
"transitions": PoolRealArray( 1, 1 ),
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [ 200.0, -720 ]
|
"values": [ 200.0, -720 ]
|
||||||
@@ -33,7 +33,7 @@ __meta__ = {
|
|||||||
|
|
||||||
[node name="Label" type="Label" parent="."]
|
[node name="Label" type="Label" parent="."]
|
||||||
margin_left = 10.0
|
margin_left = 10.0
|
||||||
margin_top = -713.381
|
margin_top = 200.0
|
||||||
margin_right = 40.0
|
margin_right = 40.0
|
||||||
margin_bottom = 14.0
|
margin_bottom = 14.0
|
||||||
custom_fonts/font = ExtResource( 1 )
|
custom_fonts/font = ExtResource( 1 )
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ _global_script_class_icons={
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="LD46 Game"
|
config/name="LD46 Game"
|
||||||
run/main_scene="res://World.tscn"
|
run/main_scene="res://Menus/Beginnings/Beginnings.tscn"
|
||||||
config/icon="res://icon.png"
|
config/icon="res://icon.png"
|
||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
@@ -154,6 +154,13 @@ attack={
|
|||||||
"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null)
|
"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
dialogue_advance={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[layer_names]
|
[layer_names]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user