diff options
author | Logan <logan@cflip.net> | 2023-01-30 16:22:16 -0700 |
---|---|---|
committer | Logan <logan@cflip.net> | 2023-01-30 16:24:47 -0700 |
commit | f23666be65e969ec54c51fdb871ab8d3611580c2 (patch) | |
tree | 70fb81c5e8317ffccf0b739c6d1000f769aea97f | |
parent | f37372a9af003bdd00cbfebf77e8a5703663fdd9 (diff) |
Added splashscreen
-rw-r--r-- | scenes/splashscreen.tscn | 82 | ||||
-rw-r--r-- | scripts/splashscreen.gd | 7 | ||||
-rw-r--r-- | sound/desksmashers.ogg.import | 2 |
3 files changed, 90 insertions, 1 deletions
diff --git a/scenes/splashscreen.tscn b/scenes/splashscreen.tscn new file mode 100644 index 0000000..5f9b6fa --- /dev/null +++ b/scenes/splashscreen.tscn @@ -0,0 +1,82 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://sound/desksmashers.ogg" type="AudioStream" id=1] +[ext_resource path="res://desksmashers.svg" type="Texture" id=2] +[ext_resource path="res://scripts/splashscreen.gd" type="Script" id=3] + +[sub_resource type="Animation" id=2] +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 0 ) ] +} + +[sub_resource type="Animation" id=1] +resource_name = "splashscreen" +length = 5.0 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0.5, 2, 3.5, 5 ), +"transitions": PoolRealArray( 1, 1, 1, 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] +} +tracks/1/type = "audio" +tracks/1/path = NodePath("Audio") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"clips": [ { +"end_offset": 0.0, +"start_offset": 0.0, +"stream": ExtResource( 1 ) +} ], +"times": PoolRealArray( 1.5 ) +} + +[node name="Node" type="Node"] +script = ExtResource( 3 ) + +[node name="Audio" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 1 ) +volume_db = -20.0 + +[node name="ColorRect" type="ColorRect" parent="."] +margin_right = 214.0 +margin_bottom = 120.0 +color = Color( 0, 0, 0, 1 ) + +[node name="Sprite" type="Sprite" parent="."] +modulate = Color( 1, 1, 1, 0 ) +position = Vector2( 107, 60 ) +scale = Vector2( 0.05, 0.05 ) +texture = ExtResource( 2 ) + +[node name="Label" type="Label" parent="Sprite"] +margin_left = -900.0 +margin_top = 620.0 +margin_right = -804.0 +margin_bottom = 636.0 +rect_scale = Vector2( 20, 20 ) +text = "desksmashers" + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/RESET = SubResource( 2 ) +anims/splashscreen = SubResource( 1 ) + +[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"] diff --git a/scripts/splashscreen.gd b/scripts/splashscreen.gd new file mode 100644 index 0000000..a78d5f7 --- /dev/null +++ b/scripts/splashscreen.gd @@ -0,0 +1,7 @@ +extends Node + +func _ready(): + $AnimationPlayer.play("splashscreen") + +func _on_AnimationPlayer_animation_finished(_splashscreen): + get_tree().change_scene("res://scenes/mainmenu.tscn") diff --git a/sound/desksmashers.ogg.import b/sound/desksmashers.ogg.import index 389edde..eb069c2 100644 --- a/sound/desksmashers.ogg.import +++ b/sound/desksmashers.ogg.import @@ -11,5 +11,5 @@ dest_files=[ "res://.import/desksmashers.ogg-3acc7ae456bf8bbcc92eb1abe626eb91.og [params] -loop=true +loop=false loop_offset=0 |