Skip to content

Commit

Permalink
Fix splash
Browse files Browse the repository at this point in the history
  • Loading branch information
williamd1k0 committed Aug 22, 2016
1 parent 3dfda7f commit 3864d37
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 38 deletions.
Binary file added misc/readme.anm
Binary file not shown.
43 changes: 26 additions & 17 deletions scenes/Disclaimer.tscn
Original file line number Diff line number Diff line change
@@ -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"]

Expand Down Expand Up @@ -34,28 +35,36 @@ 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
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"]


1 change: 1 addition & 0 deletions scenes/Main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 15 additions & 12 deletions scenes/Splash.tscn
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -13,14 +13,17 @@
[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"]

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 )
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 = [ ]
Expand All @@ -173,7 +175,6 @@ z/z = 2
texture = ExtResource( 4 )
vframes = 2
hframes = 2
frame = 3

[node name="AnimationPlayer" type="AnimationPlayer" parent="Instrunctions/Sprite"]

Expand All @@ -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
Expand All @@ -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

Expand All @@ -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"]


5 changes: 2 additions & 3 deletions scripts/disclaimer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 7 additions & 6 deletions scripts/main_splash.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 3864d37

Please sign in to comment.