mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-11 21:22:22 +02:00
Adapted titlescreen to new animation
This commit is contained in:
@@ -3,8 +3,7 @@ class_name TitleScreen
|
||||
|
||||
signal startup_finished
|
||||
|
||||
export(int) var startup_finish_frame = 65
|
||||
export(int) var loop_frame = 80
|
||||
export(int) var startup_finish_frame = 538
|
||||
|
||||
onready var new_game_button = $VBoxContainer/NewGameButton
|
||||
onready var animation_player = $AnimationPlayer
|
||||
@@ -18,10 +17,11 @@ func _ready():
|
||||
SoundControler.pub_play_music("res://Menus/Sounds/menu_theme.ogg", false)
|
||||
|
||||
func _process(_delta):
|
||||
if Input.is_action_just_pressed("skip"):
|
||||
startup.frame = startup_finish_frame
|
||||
if not finished_once and Input.is_action_just_pressed("skip"):
|
||||
startup.animation = "loop"
|
||||
startup.frame = 0
|
||||
|
||||
if startup.frame > startup_finish_frame:
|
||||
if startup.animation == "loop":
|
||||
if not finished_once:
|
||||
emit_signal("startup_finished")
|
||||
new_game_button.ignore_once = true # Pauls russian solution for ignoring the first sound click in the titlescreen
|
||||
@@ -31,7 +31,3 @@ func _process(_delta):
|
||||
|
||||
func _exit_tree():
|
||||
SoundControler.pub_stop_music()
|
||||
|
||||
func _on_Startup_animation_finished():
|
||||
startup.play("loop")
|
||||
|
||||
|
||||
@@ -210,7 +210,6 @@ quit = true
|
||||
|
||||
[node name="Label" parent="VBoxContainer/QuitButton" index="0"]
|
||||
text = "Quit"
|
||||
[connection signal="animation_finished" from="Startup" to="." method="_on_Startup_animation_finished"]
|
||||
|
||||
[editable path="VBoxContainer/NewGameButton"]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=25 format=2]
|
||||
[gd_scene load_steps=24 format=2]
|
||||
|
||||
[ext_resource path="res://Player/Player.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://World.gd" type="Script" id=2]
|
||||
@@ -13,7 +13,6 @@
|
||||
[ext_resource path="res://Debug/BossStateDisplay.gd" type="Script" id=11]
|
||||
[ext_resource path="res://Maps/Tilesets/Edge/tileset_edge.png" type="Texture" id=12]
|
||||
[ext_resource path="res://Boss/Minion.tscn" type="PackedScene" id=13]
|
||||
[ext_resource path="res://Menus/SelectUpgradeUI/button.png" type="Texture" id=14]
|
||||
[ext_resource path="res://Maps/Grid.tscn" type="PackedScene" id=18]
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=1]
|
||||
@@ -58,6 +57,10 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 )
|
||||
1/autotile/z_index_map = [ ]
|
||||
1/occluder_offset = Vector2( 0, 0 )
|
||||
1/navigation_offset = Vector2( 0, 0 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
1/shape_one_way = false
|
||||
1/shape_one_way_margin = 0.0
|
||||
1/shapes = [ ]
|
||||
1/z_index = 0
|
||||
2/name = "tileset_edge.png 2"
|
||||
@@ -68,6 +71,11 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 )
|
||||
2/tile_mode = 0
|
||||
2/occluder_offset = Vector2( 0, 0 )
|
||||
2/navigation_offset = Vector2( 0, 0 )
|
||||
2/shape_offset = Vector2( 0, 0 )
|
||||
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
2/shape = SubResource( 1 )
|
||||
2/shape_one_way = false
|
||||
2/shape_one_way_margin = 1.0
|
||||
2/shapes = [ {
|
||||
"autotile_coord": Vector2( 0, 0 ),
|
||||
"one_way": false,
|
||||
@@ -84,6 +92,11 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 )
|
||||
3/tile_mode = 0
|
||||
3/occluder_offset = Vector2( 0, 0 )
|
||||
3/navigation_offset = Vector2( 0, 0 )
|
||||
3/shape_offset = Vector2( 0, 0 )
|
||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
3/shape = SubResource( 2 )
|
||||
3/shape_one_way = false
|
||||
3/shape_one_way_margin = 1.0
|
||||
3/shapes = [ {
|
||||
"autotile_coord": Vector2( 0, 0 ),
|
||||
"one_way": false,
|
||||
@@ -100,6 +113,11 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 )
|
||||
4/tile_mode = 0
|
||||
4/occluder_offset = Vector2( 0, 0 )
|
||||
4/navigation_offset = Vector2( 0, 0 )
|
||||
4/shape_offset = Vector2( 0, 0 )
|
||||
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
4/shape = SubResource( 3 )
|
||||
4/shape_one_way = false
|
||||
4/shape_one_way_margin = 1.0
|
||||
4/shapes = [ {
|
||||
"autotile_coord": Vector2( 0, 0 ),
|
||||
"one_way": false,
|
||||
@@ -116,6 +134,11 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 )
|
||||
5/tile_mode = 0
|
||||
5/occluder_offset = Vector2( 0, 0 )
|
||||
5/navigation_offset = Vector2( 0, 0 )
|
||||
5/shape_offset = Vector2( 0, 0 )
|
||||
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
5/shape = SubResource( 4 )
|
||||
5/shape_one_way = false
|
||||
5/shape_one_way_margin = 1.0
|
||||
5/shapes = [ {
|
||||
"autotile_coord": Vector2( 0, 0 ),
|
||||
"one_way": false,
|
||||
@@ -132,6 +155,11 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
6/navigation_offset = Vector2( 0, 0 )
|
||||
6/shape_offset = Vector2( 0, 0 )
|
||||
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
6/shape = SubResource( 5 )
|
||||
6/shape_one_way = false
|
||||
6/shape_one_way_margin = 1.0
|
||||
6/shapes = [ {
|
||||
"autotile_coord": Vector2( 0, 0 ),
|
||||
"one_way": false,
|
||||
@@ -148,6 +176,11 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 )
|
||||
7/tile_mode = 0
|
||||
7/occluder_offset = Vector2( 0, 0 )
|
||||
7/navigation_offset = Vector2( 0, 0 )
|
||||
7/shape_offset = Vector2( 0, 0 )
|
||||
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
7/shape = SubResource( 6 )
|
||||
7/shape_one_way = false
|
||||
7/shape_one_way_margin = 1.0
|
||||
7/shapes = [ {
|
||||
"autotile_coord": Vector2( 0, 0 ),
|
||||
"one_way": false,
|
||||
@@ -164,6 +197,11 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 )
|
||||
8/tile_mode = 0
|
||||
8/occluder_offset = Vector2( 0, 0 )
|
||||
8/navigation_offset = Vector2( 0, 0 )
|
||||
8/shape_offset = Vector2( 0, 0 )
|
||||
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
8/shape = SubResource( 7 )
|
||||
8/shape_one_way = false
|
||||
8/shape_one_way_margin = 1.0
|
||||
8/shapes = [ {
|
||||
"autotile_coord": Vector2( 0, 0 ),
|
||||
"one_way": false,
|
||||
@@ -180,6 +218,11 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 )
|
||||
9/tile_mode = 0
|
||||
9/occluder_offset = Vector2( 0, 0 )
|
||||
9/navigation_offset = Vector2( 0, 0 )
|
||||
9/shape_offset = Vector2( 0, 0 )
|
||||
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
9/shape = SubResource( 8 )
|
||||
9/shape_one_way = false
|
||||
9/shape_one_way_margin = 1.0
|
||||
9/shapes = [ {
|
||||
"autotile_coord": Vector2( 0, 0 ),
|
||||
"one_way": false,
|
||||
@@ -296,27 +339,13 @@ margin_bottom = 0.463318
|
||||
[node name="SelectUpgradeUI" parent="CanvasLayer" instance=ExtResource( 4 )]
|
||||
visible = false
|
||||
|
||||
[node name="Win" type="TextureButton" parent="CanvasLayer"]
|
||||
[node name="Win" type="Button" parent="CanvasLayer"]
|
||||
visible = false
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
margin_left = -96.0
|
||||
margin_bottom = 25.0
|
||||
texture_normal = ExtResource( 14 )
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="CanvasLayer/Win"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -28.5
|
||||
margin_top = -7.0
|
||||
margin_right = 28.5
|
||||
margin_bottom = 7.0
|
||||
text = "Win Now"
|
||||
margin_left = -42.0
|
||||
margin_bottom = 24.0
|
||||
text = "Win"
|
||||
[connection signal="phase_changed" from="YSort/SlimeBoss" to="CanvasLayer/DebugLabel/BossStateDisplay" method="_on_SlimeBoss_phase_changed"]
|
||||
[connection signal="state_changed" from="YSort/SlimeBoss" to="CanvasLayer/DebugLabel/BossStateDisplay" method="_on_SlimeBoss_state_changed"]
|
||||
[connection signal="pressed" from="CanvasLayer/Win" to="." method="_on_Win_pressed"]
|
||||
|
||||
Reference in New Issue
Block a user