Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # The commands of the titlescreen
- extends Control
- var scene_path_to_load
- func _ready():
- $Menu/CenterRow/Buttons/campaignButton.grab_focus()
- for button in $Menu/CenterRow/Buttons.get_children():
- button.connect("pressed", self, "_on_Button_pressed", [button.scene_to_load])
- func _on_Button_pressed(scene_to_load):
- scene_path_to_load = scene_to_load
- $FadeIn.show()
- $FadeIn.fade_in()
- func _on_FadeIn_fade_finished():
- get_tree().change_scene(scene_path_to_load)
- # The commands of the associated windows to get back to the titlescreen----------------------------------------------------------------
- extends Control
- func _on_Button_pressed():
- get_tree().change_scene('res://title_screen/TitleScreen.tscn')
- extends Label
- func _on_Button_pressed():
- get_tree().change_scene('res://title_screen/TitleScreen.tscn')
- # Thats a String, which you can also find in the script of the titlescreen to get to the associate windows-----------------------------
- extends Button
- export(String) var scene_to_load
- # Thats of the animation which I use as a crossing by pressing the titlescreen button--------------------------------------------------
- extends ColorRect
- signal fade_finished
- func fade_in():
- $AnimationPlayer.play("fade_in")
- func _on_AnimationPlayer_animation_finished(anim_name):
- emit_signal("fade_finished")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement