diff --git a/models/menu/on_off.png b/models/menu/on_off.png new file mode 100644 index 0000000..278d7f5 Binary files /dev/null and b/models/menu/on_off.png differ diff --git a/ressources/sounds/menu/Microsoft Windows 98 Shutdown Sound.mp3 b/ressources/sounds/menu/Microsoft Windows 98 Shutdown Sound.mp3 new file mode 100644 index 0000000..45dc2b9 Binary files /dev/null and b/ressources/sounds/menu/Microsoft Windows 98 Shutdown Sound.mp3 differ diff --git a/ressources/sounds/menu/Microsoft Windows 98 Shutdown Sound.mp3.import b/ressources/sounds/menu/Microsoft Windows 98 Shutdown Sound.mp3.import new file mode 100644 index 0000000..0b426f6 --- /dev/null +++ b/ressources/sounds/menu/Microsoft Windows 98 Shutdown Sound.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://bnjm7gcfox6aj" +path="res://.godot/imported/Microsoft Windows 98 Shutdown Sound.mp3-5dbae7d9751993d8f3105001d30291fb.mp3str" + +[deps] + +source_file="res://ressources/sounds/menu/Microsoft Windows 98 Shutdown Sound.mp3" +dest_files=["res://.godot/imported/Microsoft Windows 98 Shutdown Sound.mp3-5dbae7d9751993d8f3105001d30291fb.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/ressources/sounds/menu/Microsoft Windows 98 Startup Sound .mp3 b/ressources/sounds/menu/Microsoft Windows 98 Startup Sound .mp3 new file mode 100644 index 0000000..cb65998 Binary files /dev/null and b/ressources/sounds/menu/Microsoft Windows 98 Startup Sound .mp3 differ diff --git a/ressources/sounds/menu/Microsoft Windows 98 Startup Sound .mp3.import b/ressources/sounds/menu/Microsoft Windows 98 Startup Sound .mp3.import new file mode 100644 index 0000000..129861d --- /dev/null +++ b/ressources/sounds/menu/Microsoft Windows 98 Startup Sound .mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://c5fgxh51yhon8" +path="res://.godot/imported/Microsoft Windows 98 Startup Sound .mp3-51335e6be6d692678355f0f41bf172b3.mp3str" + +[deps] + +source_file="res://ressources/sounds/menu/Microsoft Windows 98 Startup Sound .mp3" +dest_files=["res://.godot/imported/Microsoft Windows 98 Startup Sound .mp3-51335e6be6d692678355f0f41bf172b3.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/scenes/menu/go_in.gd b/scenes/menu/go_in.gd new file mode 100644 index 0000000..1587ebe --- /dev/null +++ b/scenes/menu/go_in.gd @@ -0,0 +1,21 @@ +extends Node2D +@onready var transition = $fade +# Called when the node enters the scene tree for the first time. + +func _ready(): + Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) + transition.play("fade_in") + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + + +func _on_timer_timeout(): + $on_sound.play() + +func _on_on_sound_finished(): + get_tree().change_scene_to_file("res://scenes/menu/menu.tscn") + pass # Replace with function body. diff --git a/scenes/menu/go_in.tscn b/scenes/menu/go_in.tscn new file mode 100644 index 0000000..4b2e483 --- /dev/null +++ b/scenes/menu/go_in.tscn @@ -0,0 +1,55 @@ +[gd_scene load_steps=6 format=3 uid="uid://bd6hvyj4335ye"] + +[ext_resource type="Script" path="res://scenes/menu/go_in.gd" id="1_fm2vx"] +[ext_resource type="Texture2D" uid="uid://dpthky7yki0m2" path="res://models/menu/on_off.png" id="2_hmhtg"] +[ext_resource type="AudioStream" uid="uid://c5fgxh51yhon8" path="res://ressources/sounds/menu/Microsoft Windows 98 Startup Sound .mp3" id="3_ekahx"] + +[sub_resource type="Animation" id="Animation_ojx4i"] +resource_name = "fade_in" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("fade/ColorRect:self_modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0.1, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(0, 0, 0, 1), Color(1, 1, 1, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_afckh"] +_data = { +"fade_in": SubResource("Animation_ojx4i") +} + +[node name="GoIn" type="Node2D"] +script = ExtResource("1_fm2vx") + +[node name="TextureRect" type="TextureRect" parent="."] +offset_right = 1604.0 +offset_bottom = 897.0 +texture = ExtResource("2_hmhtg") +expand_mode = 1 + +[node name="on_sound" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("3_ekahx") + +[node name="Timer" type="Timer" parent="."] +one_shot = true +autostart = true + +[node name="fade" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_afckh") +} + +[node name="ColorRect" type="ColorRect" parent="fade"] +self_modulate = Color(1, 1, 1, 0) +offset_right = 1625.0 +offset_bottom = 914.0 +color = Color(0, 0, 0, 1) + +[connection signal="finished" from="on_sound" to="." method="_on_on_sound_finished"] +[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]