From 3864d37040b54ff62fc2f511f674eb413a331f60 Mon Sep 17 00:00:00 2001 From: William Tumeo Date: Mon, 22 Aug 2016 02:50:32 -0300 Subject: [PATCH] Fix splash --- misc/readme.anm | Bin 0 -> 401 bytes scenes/Disclaimer.tscn | 43 +++++++++++++++++++++++++---------------- scenes/Main.tscn | 1 + scenes/Splash.tscn | 27 ++++++++++++++------------ scripts/disclaimer.gd | 5 ++--- scripts/main_splash.gd | 13 +++++++------ 6 files changed, 51 insertions(+), 38 deletions(-) create mode 100644 misc/readme.anm diff --git a/misc/readme.anm b/misc/readme.anm new file mode 100644 index 0000000000000000000000000000000000000000..441d881cf08723e8e809b793c019712eab54ade4 GIT binary patch literal 401 zcmWlWziJyn7{upprCUi3w&Vj937F3gPN_2i5h6(R2_;RyDdakE8)-=v-#>0w27!xB z<0>zZ&Ry~thO|zTC%ANZg>*R&Q_K&hnps^emw3<+&>^r3fYv@hND+ctfdR?hqAvh^argGS+-FnQ^-$9f(Y0pT_&Ow&k{7>!eV*hNO|qbn(f3MwbU+ zSypLJSf{IWvgc~GzO>0%;&zqi2BV--G{umnZI-5Rx~_28bmAzl%G&8o(>)iLdS}y7 zWY@K+T;d~o0jMV!lcXQ*Ga9_Cf5^HvqE93K$3OYEKMNpej1CC` z<}CSy!O!@h^XvZpRYXHRU@5Ltw*3;bzcr~uk0hUSe3!Mw8$707OKo= zc=7G{G%T!H{0%LR>AC+J_&E!H%Cpo9izE0Wf8yocJN_OzlhbJvyy-uzkNN6iwOqAl F{0AbGW<~%2 literal 0 HcmV?d00001 diff --git a/scenes/Disclaimer.tscn b/scenes/Disclaimer.tscn index 472d3b2..fb6893e 100644 --- a/scenes/Disclaimer.tscn +++ b/scenes/Disclaimer.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=5 format=1] +[gd_scene load_steps=6 format=1] [ext_resource path="res://scripts/disclaimer.gd" type="Script" id=1] [ext_resource path="res://fonts/apartNES.fnt" type="BitmapFont" id=2] -[ext_resource path="res://misc/fadein.anm" type="Animation" id=3] -[ext_resource path="res://misc/fadeout.anm" type="Animation" id=4] +[ext_resource path="res://misc/fade.tex" type="Texture" id=3] +[ext_resource path="res://misc/dotted-fadein.anm" type="Animation" id=4] +[ext_resource path="res://misc/dotted-fadout.anm" type="Animation" id=5] [node name="DisclaimerScene" type="Node"] @@ -34,19 +35,6 @@ percent_visible = 1.0 lines_skipped = 0 max_lines_visible = -1 -[node name="AnimationPlayer" type="AnimationPlayer" parent="Text/Label"] - -playback/process_mode = 1 -playback/default_blend_time = 0.0 -root/root = NodePath("..") -anims/fadein = ExtResource( 3 ) -anims/fadeout = ExtResource( 4 ) -next/fadeout = "" -playback/active = true -playback/speed = 1.0 -blend_times = [ ] -autoplay = "fadein" - [node name="Timer" type="Timer" parent="."] process_mode = 1 @@ -54,8 +42,29 @@ wait_time = 5.0 one_shot = true autostart = true -[connection signal="finished" from="Text/Label/AnimationPlayer" to="." method="_on_AnimationPlayer_finished"] +[node name="Sprite" type="Sprite" parent="."] + +visibility/visible = false +transform/pos = Vector2( 160, 144 ) +texture = ExtResource( 3 ) +vframes = 2 +hframes = 2 +frame = 3 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="Sprite"] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/dotted-fadein = ExtResource( 4 ) +anims/dotted-fadout = ExtResource( 5 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "" [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] +[connection signal="finished" from="Sprite/AnimationPlayer" to="." method="_on_AnimationPlayer_finished"] + diff --git a/scenes/Main.tscn b/scenes/Main.tscn index 27b9c65..4cecbdf 100644 --- a/scenes/Main.tscn +++ b/scenes/Main.tscn @@ -214,6 +214,7 @@ max_lines_visible = -1 [node name="Hit" type="Label" parent="Drake"] editor/display_folded = true +visibility/visible = false rect/scale = Vector2( 1.5, 1.5 ) focus/ignore_mouse = true focus/stop_mouse = true diff --git a/scenes/Splash.tscn b/scenes/Splash.tscn index e74db90..4cb88b6 100644 --- a/scenes/Splash.tscn +++ b/scenes/Splash.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=15 format=1] +[gd_scene load_steps=16 format=1] [ext_resource path="res://scripts/main_splash.gd" type="Script" id=1] [ext_resource path="res://misc/mhp.tex" type="Texture" id=2] @@ -13,7 +13,8 @@ [ext_resource path="res://misc/l2r.anm" type="Animation" id=11] [ext_resource path="res://nyan/nyan-run-r.anm" type="Animation" id=12] [ext_resource path="res://fonts/apartNES.fnt" type="BitmapFont" id=13] -[ext_resource path="res://misc/mm.ogg" type="AudioStream" id=14] +[ext_resource path="res://misc/readme.anm" type="Animation" id=14] +[ext_resource path="res://misc/mm.ogg" type="AudioStream" id=15] [node name="Splash" type="Node"] @@ -21,6 +22,8 @@ script/script = ExtResource( 1 ) [node name="Title" type="Node" parent="."] +editor/display_folded = true + [node name="Sprite" type="Sprite" parent="Title"] transform/pos = Vector2( 160, 144 ) @@ -131,8 +134,6 @@ autoplay = "" [node name="Instrunctions" type="Node" parent="."] -editor/display_folded = true - [node name="Text" type="Label" parent="Instrunctions"] visibility/visible = false @@ -148,7 +149,7 @@ margin/bottom = 193.0 custom_fonts/font = ExtResource( 13 ) custom_colors/font_color = Color( 0.180392, 0.270588, 0.231373, 1 ) custom_colors/font_color_shadow = Color( 0.67451, 0.776471, 0.690196, 1 ) -text = "INSTRUNCTIONS\nOne press - Block\nDouble press - Run\nHold button - Attack" +text = "INSTRUCTIONS\n\nOne press - Block\nDouble press - Run\nHold button - Attack" align = 1 valign = 1 percent_visible = 1.0 @@ -160,6 +161,7 @@ max_lines_visible = -1 playback/process_mode = 1 playback/default_blend_time = 0.0 root/root = NodePath("..") +anims/readme = ExtResource( 14 ) playback/active = true playback/speed = 1.0 blend_times = [ ] @@ -173,7 +175,6 @@ z/z = 2 texture = ExtResource( 4 ) vframes = 2 hframes = 2 -frame = 3 [node name="AnimationPlayer" type="AnimationPlayer" parent="Instrunctions/Sprite"] @@ -189,7 +190,7 @@ autoplay = "" [node name="StreamPlayer" type="StreamPlayer" parent="."] -stream/stream = ExtResource( 14 ) +stream/stream = ExtResource( 15 ) stream/play = false stream/loop = true stream/volume_db = 11.3171 @@ -205,17 +206,17 @@ wait_time = 6.0 one_shot = true autostart = true -[node name="Timer 2" type="Timer" parent="."] +[node name="Readme" type="Timer" parent="."] process_mode = 0 -wait_time = 4.0 +wait_time = 6.0 one_shot = true autostart = false -[node name="Timer 3" type="Timer" parent="."] +[node name="BeforeGame" type="Timer" parent="."] process_mode = 0 -wait_time = 2.0 +wait_time = 4.0 one_shot = true autostart = false @@ -229,6 +230,8 @@ autostart = false [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] -[connection signal="timeout" from="Timer 3" to="." method="_on_Timer_3_timeout"] +[connection signal="timeout" from="Readme" to="." method="_on_Readme_timeout"] + +[connection signal="timeout" from="BeforeGame" to="." method="_on_BeforeGame_timeout"] diff --git a/scripts/disclaimer.gd b/scripts/disclaimer.gd index 95d2bec..b1f05e1 100644 --- a/scripts/disclaimer.gd +++ b/scripts/disclaimer.gd @@ -3,13 +3,12 @@ extends Node var read = false func _ready(): - get_child(0).get_child(0).set_opacity(0) + get_child(2).get_child(0).play("dotted-fadein") func _on_Timer_timeout(): print("Changing scene...") read = true - get_child(0).get_child(0).get_child(0).play("fadeout") - + get_child(2).get_child(0).play("dotted-fadout") func _on_AnimationPlayer_finished(): if read: diff --git a/scripts/main_splash.gd b/scripts/main_splash.gd index df8824d..9694c0c 100644 --- a/scripts/main_splash.gd +++ b/scripts/main_splash.gd @@ -46,16 +46,17 @@ func _on_AnimationPlayer_finished(): func _on_Text_AnimationPlayer_finished(): if begin_game: - inst.get_child(1).show() + #inst.get_child(1).show() inst.get_child(1).get_child(0).play("dotted-fadein") - inst.get_child(0).show() - get_child(6).start() + inst.get_child(0).get_child(0).play("readme") + print(get_node("Readme").get_wait_time()) + get_node("Readme").start() -func _on_Timer_2_timeout(): +func _on_Readme_timeout(): inst.get_child(1).get_child(0).play("dotted-fadout") - get_child(7).start() + get_node("BeforeGame").start() -func _on_Timer_3_timeout(): +func _on_BeforeGame_timeout(): get_tree().change_scene("res://scenes/Main.tscn")