refining menus and gameplay slightly

This commit is contained in:
2026-02-10 22:11:47 -05:00
parent f49239b095
commit 8deef030a3
26 changed files with 402 additions and 66 deletions

View File

@@ -1,19 +0,0 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://b2l55uknctgo6"
path="res://.godot/imported/Ranma Nibun-no-ichi Bakuretsu Rantouhen - King's Casino [Qk0v_NIqVPg].mp3-8e94ad88990d9a9add4bc0f85fa990c1.mp3str"
[deps]
source_file="res://assets/audio/music/game/Ranma Nibun-no-ichi Bakuretsu Rantouhen - King's Casino [Qk0v_NIqVPg].mp3"
dest_files=["res://.godot/imported/Ranma Nibun-no-ichi Bakuretsu Rantouhen - King's Casino [Qk0v_NIqVPg].mp3-8e94ad88990d9a9add4bc0f85fa990c1.mp3str"]
[params]
loop=false
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4

View File

@@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://b2l55uknctgo6"
path="res://.godot/imported/Ranma Nibun-no-ichi Bakuretsu Rantouhen - King's Casino [Qk0v_NIqVPg].mp3-9eaaca05bdae24e099dee7de4cba6a53.mp3str"
[deps]
source_file="res://assets/audio/music/game/comet_zap/Ranma Nibun-no-ichi Bakuretsu Rantouhen - King's Casino [Qk0v_NIqVPg].mp3"
dest_files=["res://.godot/imported/Ranma Nibun-no-ichi Bakuretsu Rantouhen - King's Casino [Qk0v_NIqVPg].mp3-9eaaca05bdae24e099dee7de4cba6a53.mp3str"]
[params]
loop=false
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4

View File

@@ -3,12 +3,12 @@
importer="mp3"
type="AudioStreamMP3"
uid="uid://c8017fjw3ntl0"
path="res://.godot/imported/2-27. Pursuit - A Great Turnabout.mp3-1bdcec64afb63b29e49d7da3853f7b50.mp3str"
path="res://.godot/imported/2-27. Pursuit - A Great Turnabout.mp3-1cc4f5fdb63cda6eb0ef101c8255fc51.mp3str"
[deps]
source_file="res://assets/audio/music/game/2-27. Pursuit - A Great Turnabout.mp3"
dest_files=["res://.godot/imported/2-27. Pursuit - A Great Turnabout.mp3-1bdcec64afb63b29e49d7da3853f7b50.mp3str"]
source_file="res://assets/audio/music/game/fish_cascade/2-27. Pursuit - A Great Turnabout.mp3"
dest_files=["res://.godot/imported/2-27. Pursuit - A Great Turnabout.mp3-1cc4f5fdb63cda6eb0ef101c8255fc51.mp3str"]
[params]

Binary file not shown.

View File

@@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://ckr4pf3etle0p"
path="res://.godot/imported/SYS_cancel.ogg-c22a65a563daff9d0793ac3c1b320e7f.oggvorbisstr"
[deps]
source_file="res://assets/audio/sfx/SYS_cancel.ogg"
dest_files=["res://.godot/imported/SYS_cancel.ogg-c22a65a563daff9d0793ac3c1b320e7f.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c8v48j25wttlu"
path="res://.godot/imported/3197461036_811156801b_b.jpg-6ebe9f23f9662c3eb9b39d57a6149e47.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/visual/backgrounds/misc/3197461036_811156801b_b.jpg"
dest_files=["res://.godot/imported/3197461036_811156801b_b.jpg-6ebe9f23f9662c3eb9b39d57a6149e47.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -27,3 +27,5 @@ GORO MAJIMA
HORNET SILKSONG
MAKOTO YUKI
SORA
SUPERCALIFRAGILISTICEXPIALIDOCIOUS
PNEUMONOULTRAMICROSCOPICSILICOVOLCANOCONIOSIS

View File

@@ -0,0 +1,2 @@
test
AAAA

View File

@@ -21,8 +21,8 @@ config/icon="uid://cicpbsmd3i1x4"
[display]
window/size/viewport_width=1280
window/size/viewport_height=720
window/size/viewport_width=1920
window/size/viewport_height=1080
window/stretch/mode="canvas_items"
[rendering]

View File

@@ -12,16 +12,40 @@ var alphabet = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N",
"O","P","Q","R","S","T","U","V","W","X","Y","Z"]
var comets = []
var comet_speed = 150
var active
# display
var viewport_size
var scale_factor_x
var scale_factor_y
# numbers
var delay = 2
var delay = 1.5
var spawn_timer = 0
var max_character_count = 0
# objects
var comet_source = preload("res://scenes/objects/game/comet.tscn")
var fade
var pause_menu
# Runs on start
func _ready() -> void:
viewport_size = get_viewport_rect().size
#scale_factor_x = viewport_size.x/1280
#scale_factor_y = viewport_size.y/720
#print($Tux.position)
#$Tux.position = Vector2($Tux.position.x * scale_factor_x, $Tux.position.y * scale_factor_y)
#print($Tux.position)
active = true
pause_menu = self.get_node("OnTop").get_node("Pause")
fade = self.get_node("OnTop").get_node("Fade")
fade.visible = true
var tween := create_tween()
tween.parallel().tween_property(fade, "modulate:a", 0, 1).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)
# Load Corresponding Text File
word_set_file_path = "res://gameplay/word_sets/" + word_set + ".txt"
@@ -36,42 +60,65 @@ func _ready() -> void:
if word_set_array[len(word_set_array)-1] == "":
word_set_array.remove_at(len(word_set_array)-1)
for word in word_set_array:
if len(word) > max_character_count:
print("new longest word: " + str(word) + " " + str(len(word)))
max_character_count = len(word)
#print(word_set_array)
# Runs every frame
func _process(delta: float) -> void:
spawn_timer += delta
if spawn_timer >= delay:
spawn_timer = 0
spawn_word()
if active:
spawn_timer += delta
if spawn_timer >= delay:
spawn_timer = 0
spawn_word()
func spawn_word():
var scan_commet = comet_source.instantiate()
var comet_width = scan_commet.get_node("Sprite").sprite_frames.get_frame_texture("comet",0).get_width()
var new_word = word_set_array[randi_range(0,len(word_set_array)-1)]
var viewport_size = get_viewport_rect().size
var offset = 0
var dist = (viewport_size.x - (2*comet_width))/(max_character_count-1)
var offset = comet_width
scan_commet.queue_free()
for char in new_word:
if char != " ":
var new_commet = comet_source.instantiate()
new_commet.position = Vector2(128+offset,-128)
new_commet.position = Vector2(offset,-128)
new_commet.get_node("Sprite").get_node("Label").text = char
new_commet.speed = comet_speed
add_child(new_commet)
comets.append(new_commet)
offset += 75
offset += dist
func _input(event):
if event is InputEventKey and event.pressed:
if event.as_text() in alphabet:
print(event.as_text())
if len(comets) > 0:
var comet = comets[0]
if event.as_text() == comet.get_node("Sprite").get_node("Label").text:
comets.erase(comet)
comet.get_node("Sprite").play("cometbreak")
$CometBreakSound.play()
await comet.get_node("Sprite").animation_finished
comet.queue_free()
if active:
if len(comets) > 0:
var comet = comets[0]
if event.as_text() == comet.get_node("Sprite").get_node("Label").text:
comet.active = false
var laser = Line2D.new()
laser.default_color = Color.RED
laser.points = PackedVector2Array([$Tux.position,comet.position])
add_child(laser)
comets.erase(comet)
comet.get_node("Sprite").play("cometbreak")
$CometBreakSound.play()
await comet.get_node("Sprite").animation_finished
laser.queue_free()
comet.queue_free()
elif event.keycode == KEY_ESCAPE:
if pause_menu.visible:
pause_menu.resume()
$BackgroundMusic.play()
else:
$Back.play()
active = false
pause_menu.visible = true
$BackgroundMusic.stop()

View File

@@ -1,10 +1,12 @@
[gd_scene format=3 uid="uid://bef8re5x0kmmd"]
[ext_resource type="Script" uid="uid://c7vntfq6dyb2k" path="res://scenes/game/comet_zap.gd" id="1_eyb20"]
[ext_resource type="Texture2D" uid="uid://b0qibayc8b02i" path="res://assets/visual/backgrounds/misc/10-6.png" id="1_lcssi"]
[ext_resource type="AudioStream" uid="uid://b2l55uknctgo6" path="res://assets/audio/music/game/Ranma Nibun-no-ichi Bakuretsu Rantouhen - King's Casino [Qk0v_NIqVPg].mp3" id="2_ije4o"]
[ext_resource type="Texture2D" uid="uid://dshpn3ffg3bch" path="res://original data/images/backgrounds/0.jpg" id="2_2j0xl"]
[ext_resource type="AudioStream" uid="uid://b2l55uknctgo6" path="res://assets/audio/music/game/comet_zap/Ranma Nibun-no-ichi Bakuretsu Rantouhen - King's Casino [Qk0v_NIqVPg].mp3" id="2_ije4o"]
[ext_resource type="AudioStream" uid="uid://ckr4pf3etle0p" path="res://assets/audio/sfx/SYS_cancel.ogg" id="4_2j0xl"]
[ext_resource type="Texture2D" uid="uid://jd2rnhvq6gl6" path="res://original data/images/tux/tux-yes2.png" id="4_yib6v"]
[ext_resource type="AudioStream" uid="uid://t6tbvilcrwy8" path="res://assets/audio/sfx/SE_Push.ogg" id="5_62k7v"]
[ext_resource type="PackedScene" uid="uid://dm6jp4gjboooc" path="res://scenes/menus/pause/pause.tscn" id="6_cjaft"]
[node name="CometZap" type="Node2D" unique_id=1227404695]
script = ExtResource("1_eyb20")
@@ -28,7 +30,7 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_lcssi")
texture = ExtResource("2_2j0xl")
expand_mode = 1
metadata/_edit_use_anchors_ = true
@@ -37,11 +39,28 @@ stream = ExtResource("2_ije4o")
autoplay = true
parameters/looping = true
[node name="Tux" type="Sprite2D" parent="." unique_id=1799546830]
position = Vector2(599, 651.00006)
scale = Vector2(2.654338, 2.220616)
texture = ExtResource("4_yib6v")
[node name="Back" type="AudioStreamPlayer2D" parent="." unique_id=738599237]
stream = ExtResource("4_2j0xl")
[node name="CometBreakSound" type="AudioStreamPlayer2D" parent="." unique_id=169663936]
stream = ExtResource("5_62k7v")
volume_db = -10.0
[node name="Tux" type="Sprite2D" parent="." unique_id=1799546830]
position = Vector2(960, 990)
scale = Vector2(3.583, 3)
texture = ExtResource("4_yib6v")
[node name="OnTop" type="CanvasLayer" parent="." unique_id=828008006]
[node name="Pause" parent="OnTop" unique_id=1227462733 instance=ExtResource("6_cjaft")]
visible = false
[node name="Fade" type="ColorRect" parent="OnTop" unique_id=1872046404]
visible = false
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
color = Color(0, 0, 0, 1)

View File

@@ -15,7 +15,7 @@
[ext_resource type="Texture2D" uid="uid://bequiqfu54xe7" path="res://original data/images/tux/walk1.png" id="12_tj4tg"]
[ext_resource type="Texture2D" uid="uid://f6sy7wboy6td" path="res://original data/images/tux/walk2.png" id="13_wevax"]
[ext_resource type="Texture2D" uid="uid://nduj5djmkad7" path="res://original data/images/tux/walk3.png" id="14_8sqkf"]
[ext_resource type="AudioStream" uid="uid://c8017fjw3ntl0" path="res://assets/audio/music/game/2-27. Pursuit - A Great Turnabout.mp3" id="16_wevax"]
[ext_resource type="AudioStream" uid="uid://c8017fjw3ntl0" path="res://assets/audio/music/game/fish_cascade/2-27. Pursuit - A Great Turnabout.mp3" id="16_wevax"]
[sub_resource type="SpriteFrames" id="SpriteFrames_5wky4"]
animations = [{

View File

@@ -0,0 +1,35 @@
extends Control
var scene
var button_sound
var fade
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
scene = get_tree().current_scene
button_sound = $ButtonPress
fade = self.get_parent().get_node("Fade")
fade.visible = true
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func resume():
button_sound.play()
scene.active = true
self.visible = false
func _on_back_pressed() -> void:
resume()
func _on_options_pressed() -> void:
pass
func _on_exit_pressed() -> void:
var tween := create_tween()
tween.parallel().tween_property(fade, "modulate:a", 1, 1).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)
button_sound.play()
await button_sound.finished
get_tree().change_scene_to_file("res://scenes/menus/start_menu/title.tscn")

View File

@@ -0,0 +1 @@
uid://15e0tr7en3iq

View File

@@ -0,0 +1,65 @@
[gd_scene format=3 uid="uid://dm6jp4gjboooc"]
[ext_resource type="Script" uid="uid://15e0tr7en3iq" path="res://scenes/menus/pause/pause.gd" id="1_8lsyj"]
[ext_resource type="AudioStream" uid="uid://podscahsf0d4" path="res://assets/audio/sfx/MenuAccept.wav" id="2_y88h8"]
[node name="Pause" type="Control" unique_id=1227462733]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_8lsyj")
[node name="Dim" type="ColorRect" parent="." unique_id=677985495]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 0.29411766)
[node name="BoxContainer" type="BoxContainer" parent="." unique_id=724874690]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -267.0
offset_top = -162.5
offset_right = 267.0
offset_bottom = 162.5
grow_horizontal = 2
grow_vertical = 2
alignment = 1
vertical = true
[node name="Back" type="Button" parent="BoxContainer" unique_id=2010495470]
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/font_size = 32
text = "Resume"
[node name="Options" type="Button" parent="BoxContainer" unique_id=1573468039]
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/font_size = 32
text = "Options"
[node name="Exit" type="Button" parent="BoxContainer" unique_id=870296717]
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/font_size = 32
text = "Back To Title
"
[node name="ButtonPress" type="AudioStreamPlayer2D" parent="." unique_id=1518446961]
stream = ExtResource("2_y88h8")
volume_db = -10.0
[connection signal="pressed" from="BoxContainer/Back" to="." method="_on_back_pressed"]
[connection signal="pressed" from="BoxContainer/Options" to="." method="_on_options_pressed"]
[connection signal="pressed" from="BoxContainer/Exit" to="." method="_on_exit_pressed"]

View File

@@ -1,9 +1,11 @@
extends Control
var game_mode
var stage = 0
var word_select
var main_buttons
var fade
var header
var word_select_button = preload("res://scenes/objects/ui/word_select_button.tscn")
func check_text_files(path):
@@ -27,6 +29,7 @@ func check_text_files(path):
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
game_mode = null
header = self.get_node("Header")
fade = self.get_node("Fade")
fade.visible = true
main_buttons = self.get_node("MainButtons")
@@ -44,13 +47,38 @@ func open_word_menu():
pass
func _on_comet_pressed() -> void:
header.text = "Select Word Set"
stage = 1
game_mode = "comet"
self.get_node("ButtonPress").play()
main_buttons.visible = false
word_select.visible = true
func _on_cascade_pressed() -> void:
header.text = "Select Word Set"
stage = 1
game_mode = "cascade"
self.get_node("ButtonPress").play()
main_buttons.visible = false
word_select.visible = true
func _on_quit_pressed() -> void:
$BackgroundMusic.stop()
$Bye.play()
var tween := create_tween()
tween.parallel().tween_property(fade, "modulate:a", 1, 0.5).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)
await get_tree().create_timer(1.5).timeout
get_tree().quit()
func _input(event):
if event is InputEventKey and event.pressed:
if event.keycode == KEY_ESCAPE:
if stage == 1:
header.text = "Select Mode"
$Back.play()
stage = 0
game_mode = null
main_buttons.visible = true
word_select.visible = false

View File

@@ -1,10 +1,12 @@
[gd_scene format=3 uid="uid://cb2i4ei3lihbh"]
[ext_resource type="Shader" path="res://scroll.gdshader" id="1_3oan1"]
[ext_resource type="Shader" uid="uid://b4yhwgv8l8djq" path="res://scroll.gdshader" id="1_3oan1"]
[ext_resource type="Script" uid="uid://buqy4h8s5nhg7" path="res://scenes/menus/select_mode/select_mode.gd" id="1_avhy0"]
[ext_resource type="Texture2D" uid="uid://dew71sa7dwdnc" path="res://textures/tux typing +.png" id="2_3oan1"]
[ext_resource type="AudioStream" uid="uid://df31l8x4fxwf0" path="res://assets/audio/music/menus/Mario Kart Wii Music - Menu (Medley) [fN2dJP0WLDQ].mp3" id="3_xhbdh"]
[ext_resource type="AudioStream" uid="uid://podscahsf0d4" path="res://assets/audio/sfx/MenuAccept.wav" id="5_32ulc"]
[ext_resource type="AudioStream" uid="uid://cv5et4r5063yq" path="res://assets/audio/sfx/OuttaHere.wav" id="6_0p6fv"]
[ext_resource type="AudioStream" uid="uid://ckr4pf3etle0p" path="res://assets/audio/sfx/SYS_cancel.ogg" id="7_maffk"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_aeitr"]
shader = ExtResource("1_3oan1")
@@ -13,6 +15,9 @@ shader_parameter/speed = 0.1
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_cqx26"]
load_path = "res://.godot/imported/wp2812464.jpg-16426a98baf4dc04320bc61fb53f8deb.ctex"
[sub_resource type="LabelSettings" id="LabelSettings_maffk"]
font_size = 120
[node name="Control" type="Control" unique_id=550682840]
layout_mode = 3
anchors_preset = 15
@@ -55,18 +60,19 @@ anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -288.5
offset_top = -360.0
offset_top = -222.5
offset_right = 288.5
offset_bottom = 360.0
offset_bottom = 461.0
grow_horizontal = 2
grow_vertical = 2
[node name="WordSelect" type="VBoxContainer" parent="WordSelectScroll" unique_id=56995036]
[node name="WordSelect" type="BoxContainer" parent="WordSelectScroll" unique_id=549402027]
visible = false
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
alignment = 1
vertical = true
[node name="MainButtons" type="BoxContainer" parent="." unique_id=881316051]
layout_mode = 1
@@ -85,6 +91,7 @@ vertical = true
[node name="Cascade" type="Button" parent="MainButtons" unique_id=1019308409]
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/font_size = 50
text = "Fish Cascade
"
@@ -92,6 +99,7 @@ expand_icon = true
[node name="Comet" type="Button" parent="MainButtons" unique_id=1352982543]
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/font_size = 50
text = "Comet Zap
"
@@ -99,6 +107,7 @@ expand_icon = true
[node name="Lessons" type="Button" parent="MainButtons" unique_id=1616574107]
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/font_size = 50
text = "Lessons
"
@@ -106,26 +115,50 @@ expand_icon = true
[node name="Options" type="Button" parent="MainButtons" unique_id=249277019]
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/font_size = 50
text = "Options"
expand_icon = true
[node name="Quit" type="Button" parent="MainButtons" unique_id=1080429911]
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/font_size = 50
text = "Quit
"
expand_icon = true
[node name="Header" type="Label" parent="." unique_id=1583137254]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -352.0
offset_top = -440.0
offset_right = 352.0
offset_bottom = -275.0
grow_horizontal = 2
grow_vertical = 2
text = "Select Mode"
label_settings = SubResource("LabelSettings_maffk")
[node name="BackgroundMusic" type="AudioStreamPlayer2D" parent="." unique_id=1780401057]
stream = ExtResource("3_xhbdh")
volume_db = -20.0
volume_db = -10.0
autoplay = true
parameters/looping = true
[node name="ButtonPress" type="AudioStreamPlayer2D" parent="." unique_id=1605257004]
stream = ExtResource("5_32ulc")
volume_db = -20.0
volume_db = -10.0
[node name="Bye" type="AudioStreamPlayer2D" parent="." unique_id=189986693]
stream = ExtResource("6_0p6fv")
[node name="Back" type="AudioStreamPlayer2D" parent="." unique_id=732973693]
stream = ExtResource("7_maffk")
[node name="Fade" type="ColorRect" parent="." unique_id=1920157134]
visible = false
@@ -140,3 +173,4 @@ color = Color(0, 0, 0, 1)
[connection signal="pressed" from="MainButtons/Cascade" to="." method="_on_cascade_pressed"]
[connection signal="pressed" from="MainButtons/Comet" to="." method="_on_comet_pressed"]
[connection signal="pressed" from="MainButtons/Quit" to="." method="_on_quit_pressed"]

View File

@@ -0,0 +1,26 @@
extends Control
var fade
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
fade = $Fade
fade.visible = true
var tween := create_tween()
tween.parallel().tween_property(fade, "modulate:a", 0, .5).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _input(event):
if event is InputEventKey and event.pressed:
if event.keycode == KEY_ESCAPE:
$TitleMusic.stop()
$Bye.play()
var tween := create_tween()
tween.parallel().tween_property(fade, "modulate:a", 1, 0.5).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)
await get_tree().create_timer(1.5).timeout
get_tree().quit()

View File

@@ -0,0 +1 @@
uid://fh2cd7vlu5fy

View File

@@ -1,11 +1,13 @@
[gd_scene format=3 uid="uid://c536b5suvq3ep"]
[ext_resource type="Script" uid="uid://fh2cd7vlu5fy" path="res://scenes/menus/start_menu/title.gd" id="1_iysul"]
[ext_resource type="Shader" uid="uid://b4yhwgv8l8djq" path="res://scroll.gdshader" id="1_kpexm"]
[ext_resource type="Texture2D" uid="uid://db557qcd1godx" path="res://textures/scrolbackground.png" id="2_3xoar"]
[ext_resource type="Texture2D" uid="uid://dew71sa7dwdnc" path="res://textures/tux typing +.png" id="3_mom7w"]
[ext_resource type="Script" uid="uid://cvxtof1igytdj" path="res://scenes/menus/start_menu/start_button.gd" id="4_jd0r5"]
[ext_resource type="AudioStream" uid="uid://cphmtgjrvot1n" path="res://assets/audio/music/menus/Discovery (Title Screen) - Sonic Mania [OST] [UZpxOFyEOZY].mp3" id="5_tufir"]
[ext_resource type="AudioStream" uid="uid://podscahsf0d4" path="res://assets/audio/sfx/MenuAccept.wav" id="6_uskxy"]
[ext_resource type="AudioStream" uid="uid://cv5et4r5063yq" path="res://assets/audio/sfx/OuttaHere.wav" id="8_ggcqs"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_nlc08"]
shader = ExtResource("1_kpexm")
@@ -55,13 +57,14 @@ shadow_size = 32
shadow_color = Color(0.9254902, 0.38039216, 0.6666667, 1)
shadow_offset = Vector2(9.8, 5.495)
[node name="Control" type="Control" unique_id=2056562558]
[node name="Title" type="Control" unique_id=2056562558]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_iysul")
[node name="ColorRect" type="ColorRect" parent="." unique_id=832996317]
layout_mode = 1
@@ -129,15 +132,15 @@ vertical_alignment = 1
[node name="TitleMusic" type="AudioStreamPlayer2D" parent="." unique_id=200515057]
stream = ExtResource("5_tufir")
volume_db = -20.0
volume_db = -10.0
autoplay = true
[node name="ButtonPress" type="AudioStreamPlayer2D" parent="." unique_id=878860967]
stream = ExtResource("6_uskxy")
volume_db = -20.0
volume_db = -10.0
[node name="Fade" type="ColorRect" parent="." unique_id=884781609]
modulate = Color(1, 1, 1, 0)
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@@ -147,4 +150,7 @@ grow_vertical = 2
mouse_filter = 2
color = Color(0, 0, 0, 1)
[node name="Bye" type="AudioStreamPlayer2D" parent="." unique_id=819718365]
stream = ExtResource("8_ggcqs")
[connection signal="pressed" from="StartButton" to="StartButton" method="_on_pressed"]

View File

@@ -2,13 +2,16 @@ extends Node2D
var speed = 100
var scene
var active = true
func _ready() -> void:
scene = self.get_parent()
func _process(delta: float) -> void:
self.position.y += speed*delta
active = scene.active
if self.position.y >= 720:
if active:
self.position.y += speed*delta
if self.position.y >= get_viewport_rect().size.y:
scene.comets.erase(self)
self.queue_free()

View File

@@ -6,6 +6,11 @@ var next_scene
func _on_pressed() -> void:
current_scene = self.get_parent().get_parent().get_parent()
var tween := create_tween()
tween.parallel().tween_property(current_scene.get_node("Fade"), "modulate:a", 1, 0.5).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)
self.get_parent().get_parent().visible = false
if current_scene.game_mode == "cascade":
$ButtonPress.play()
await $ButtonPress.finished

View File

@@ -9,11 +9,14 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_font_sizes/font_size = 50
text = "Placeholder"
script = ExtResource("1_mjqrp")
[node name="ButtonPress" type="AudioStreamPlayer2D" parent="." unique_id=1570916989]
stream = ExtResource("2_suean")
volume_db = -20.0
volume_db = -10.0
[connection signal="pressed" from="." to="." method="_on_pressed"]