Compare commits
No commits in common. "master" and "20250503.0" have entirely different histories.
master
...
20250503.0
11 changed files with 19 additions and 617 deletions
|
@ -11,10 +11,8 @@ var velocity := 0.0:
|
|||
if value != velocity:
|
||||
velocity_change.emit(value)
|
||||
velocity = value
|
||||
@onready var ball_position: Vector3 = $Sphere.position
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
ball_position = $Sphere.position
|
||||
$SpotLightMain.position = $Sphere.position + Vector3(0, 5, 0)
|
||||
$SpotLightTop.position = $Sphere.position
|
||||
$SpotLightLeft.position = $Sphere.position
|
||||
|
|
Binary file not shown.
|
@ -1,35 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://b1y3v45qjku1w"
|
||||
path="res://.godot/imported/Galindo-Regular.ttf-d19a5a025e54556959a3f470847ddd23.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://fonts/Galindo/Galindo-Regular.ttf"
|
||||
dest_files=["res://.godot/imported/Galindo-Regular.ttf-d19a5a025e54556959a3f470847ddd23.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
|
@ -1,94 +0,0 @@
|
|||
Copyright (c) 2012, Brian J. Bonislawsky DBA Astigmatic (AOETI) (astigma@astigmatic.com), with Reserved Font Names "Galindo"
|
||||
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://openfontlicense.org
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
69
gui/map.tscn
69
gui/map.tscn
|
@ -1,69 +0,0 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bcxbw6wd54ksv"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_r4thc"]
|
||||
script/source = "extends Control
|
||||
|
||||
func _ready() -> void:
|
||||
$TemplateRing.hide()
|
||||
|
||||
func display_rings(player: Node3D, rings: Array[Ring]) -> void:
|
||||
var old_rings_display := $Rings.get_children()
|
||||
var difference := len(rings) - len(old_rings_display)
|
||||
|
||||
# Too many displayed, free them
|
||||
for i in -difference:
|
||||
old_rings_display[-(1 + i)].queue_free()
|
||||
# Not enough displayed, create some
|
||||
for i in difference:
|
||||
var new_child := $TemplateRing.duplicate()
|
||||
new_child.name = \"Ring\" + str(i + 1)
|
||||
new_child.show()
|
||||
$Rings.add_child(new_child)
|
||||
|
||||
var rings_display := $Rings.get_children()
|
||||
var center: Vector2i = get_viewport().size / 2
|
||||
for i in len(rings):
|
||||
rings_display[i].color = rings[i].material.albedo_color
|
||||
rings_display[i].rotation = rings[i].rotation.z
|
||||
rings_display[i].position.x = center.x + rings[i].position.x - player.ball_position.x
|
||||
rings_display[i].position.y = center.y - rings[i].position.y + player.ball_position.y
|
||||
|
||||
if rings[i].collected:
|
||||
rings_display[i].scale = $TemplateRing.scale * 2 * min(4, max(1, rings[i].scale.x))
|
||||
else:
|
||||
rings_display[i].scale = $TemplateRing.scale * 3 * min(4, max(1, rings[i].scale.x))
|
||||
|
||||
#rings_display[i].scale.x += abs(rings[i].position.x - player.ball_position.x) / 32
|
||||
#rings_display[i].scale.y += abs(rings[i].position.y - player.ball_position.y) / 32
|
||||
"
|
||||
|
||||
[node name="Map" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = SubResource("GDScript_r4thc")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(1, 0, 1, 0.0392157)
|
||||
|
||||
[node name="Rings" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="TemplateRing" type="ColorRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_right = 2.0
|
||||
offset_bottom = 2.0
|
28
index.tscn
28
index.tscn
|
@ -1,9 +1,8 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://ccgnnif026wb4"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://ccgnnif026wb4"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://xd3nsiglcdfc" path="res://gui/timer.tscn" id="1_356j3"]
|
||||
[ext_resource type="PackedScene" uid="uid://dw0xl8644x166" path="res://gui/gravity.tscn" id="1_ir7so"]
|
||||
[ext_resource type="PackedScene" uid="uid://cckeamgkt8bqo" path="res://gui/speed.tscn" id="2_2gn6w"]
|
||||
[ext_resource type="PackedScene" uid="uid://bcxbw6wd54ksv" path="res://gui/map.tscn" id="2_d1yoc"]
|
||||
[ext_resource type="PackedScene" uid="uid://cn55m5dqo3m6u" path="res://gui/rings.tscn" id="3_mbj17"]
|
||||
[ext_resource type="PackedScene" uid="uid://dkxtwpcy4moyo" path="res://menus/pause_menu.tscn" id="4_3bfj3"]
|
||||
|
||||
|
@ -20,7 +19,6 @@ var current_level_scene: PackedScene
|
|||
const res_main_menu = preload(\"res://menus/main/main_menu.tscn\")
|
||||
|
||||
@onready var gui_gravity := $GUI/Gravity
|
||||
@onready var gui_map := $GUI/Map
|
||||
@onready var gui_timer := $GUI/TopLeft/Timer
|
||||
@onready var gui_speed := $GUI/TopRight/Speed
|
||||
@onready var gui_rings := $GUI/BottomRight/Rings
|
||||
|
@ -37,8 +35,8 @@ func _ready() -> void:
|
|||
|
||||
## Connect to necessary signals
|
||||
pause_menu.connect(\"request_pause\", pause_game)
|
||||
pause_menu.connect(\"request_fullscreen\", fullscreen_game)
|
||||
pause_menu.connect(\"request_restart\", restart_level)
|
||||
pause_menu.connect(\"request_quit\", quit_current_level)
|
||||
|
||||
set_main_menu()
|
||||
|
||||
|
@ -96,18 +94,6 @@ func finish_current_level() -> void:
|
|||
|
||||
set_main_menu()
|
||||
|
||||
func quit_current_level() -> void:
|
||||
gui_timer.enabled = false
|
||||
PhysicsServer3D.area_set_param(get_viewport().find_world_3d().space, PhysicsServer3D.AREA_PARAM_GRAVITY, 0.5)
|
||||
playing = false
|
||||
changing_level = true
|
||||
|
||||
pause_menu.hide()
|
||||
SaveFiles.change_property(\"played_for\", gui_timer.seconds_spent_total, SaveFiles.selected_file)
|
||||
if is_instance_valid(current_level):
|
||||
current_level.queue_free()
|
||||
set_main_menu()
|
||||
|
||||
func restart_level() -> void:
|
||||
gui_timer.enabled = false
|
||||
if !current_level or changing_level:
|
||||
|
@ -144,14 +130,8 @@ func fullscreen_game() -> void:
|
|||
func _process(_delta: float) -> void:
|
||||
if is_instance_valid(current_level):
|
||||
gui_speed.ball_velocity = current_level.velocity
|
||||
if Input.is_action_pressed(\"display_map\"):
|
||||
gui_map.display_rings(current_level.player, current_level.rings)
|
||||
|
||||
func _input(_event: InputEvent) -> void:
|
||||
if Input.is_action_just_released(\"display_map\"):
|
||||
gui_map.hide()
|
||||
if Input.is_action_just_pressed(\"display_map\"):
|
||||
gui_map.show()
|
||||
if Input.is_action_just_pressed(\"restart_level\"):
|
||||
restart_level()
|
||||
|
||||
|
@ -174,10 +154,6 @@ mouse_filter = 2
|
|||
[node name="Gravity" parent="GUI" instance=ExtResource("1_ir7so")]
|
||||
layout_mode = 1
|
||||
|
||||
[node name="Map" parent="GUI" instance=ExtResource("2_d1yoc")]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
|
||||
[node name="TopLeft" type="MarginContainer" parent="GUI"]
|
||||
layout_mode = 1
|
||||
offset_right = 160.0
|
||||
|
|
|
@ -12,7 +12,6 @@ const gravity_strength_strong = gravity_strength_normal * 3
|
|||
## Lowercase, spaceless name of the level
|
||||
var id: String
|
||||
var thumbnail: CompressedTexture2D
|
||||
var player: Node3D
|
||||
var music: Music
|
||||
var rings: Array[Ring] = []
|
||||
|
||||
|
@ -40,8 +39,6 @@ func _ready() -> void:
|
|||
for child in children:
|
||||
if is_instance_of(child, Music):
|
||||
music = child
|
||||
if child.name == "Player" and is_instance_of(child, Node3D):
|
||||
player = child
|
||||
assert(is_instance_valid(music), self.name + " has no music!")
|
||||
|
||||
var rings_node = get_node("Rings")
|
||||
|
|
141
menus/menu.tres
141
menus/menu.tres
|
@ -1,141 +0,0 @@
|
|||
[gd_resource type="Theme" load_steps=11 format=3 uid="uid://c6ceauyc42c33"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://b1y3v45qjku1w" path="res://fonts/Galindo/Galindo-Regular.ttf" id="2_fg72k"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_udy6f"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_udy6f"]
|
||||
bg_color = Color(0.443029, 0.566882, 1, 1)
|
||||
skew = Vector2(0.2, 0)
|
||||
border_width_left = 4
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 4
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
border_blend = true
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
expand_margin_left = 10.0
|
||||
expand_margin_right = 10.0
|
||||
shadow_size = 2
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ryjg5"]
|
||||
bg_color = Color(0.820204, 0.452768, 0.716911, 1)
|
||||
skew = Vector2(0.3, 0)
|
||||
border_width_left = 4
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 4
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
border_blend = true
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
expand_margin_left = 10.0
|
||||
expand_margin_right = 10.0
|
||||
shadow_size = 2
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fg72k"]
|
||||
bg_color = Color(1, 1, 1, 1)
|
||||
skew = Vector2(0.1, 0)
|
||||
border_width_left = 4
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 4
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
border_blend = true
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
expand_margin_left = 10.0
|
||||
expand_margin_right = 10.0
|
||||
shadow_size = 2
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ryjg5"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qi7qm"]
|
||||
bg_color = Color(3.27289e-06, 0.697602, 0.601869, 1)
|
||||
skew = Vector2(-0.3, 0)
|
||||
border_width_left = 4
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 4
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
border_blend = true
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
expand_margin_left = 10.0
|
||||
expand_margin_right = 10.0
|
||||
shadow_size = 2
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_iwc3v"]
|
||||
bg_color = Color(3.27289e-06, 0.697602, 0.601869, 1)
|
||||
skew = Vector2(-0.3, 0)
|
||||
border_width_left = 4
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 4
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
border_blend = true
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
expand_margin_left = 10.0
|
||||
expand_margin_right = 10.0
|
||||
shadow_size = 2
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cq8do"]
|
||||
bg_color = Color(0.630949, 0.539791, 0.840276, 1)
|
||||
skew = Vector2(-0.3, 0)
|
||||
border_width_left = 4
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 4
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
border_blend = true
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
expand_margin_left = 10.0
|
||||
expand_margin_right = 10.0
|
||||
shadow_size = 2
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8lbit"]
|
||||
bg_color = Color(0.374451, 0.600068, 0.944077, 1)
|
||||
skew = Vector2(-0.3, 0)
|
||||
border_width_left = 4
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 4
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
border_blend = true
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
expand_margin_left = 10.0
|
||||
expand_margin_right = 10.0
|
||||
shadow_size = 2
|
||||
|
||||
[resource]
|
||||
default_font = ExtResource("2_fg72k")
|
||||
default_font_size = 32
|
||||
Button/colors/font_pressed_color = Color(0, 0, 0, 1)
|
||||
Button/styles/focus = SubResource("StyleBoxEmpty_udy6f")
|
||||
Button/styles/hover = SubResource("StyleBoxFlat_udy6f")
|
||||
Button/styles/normal = SubResource("StyleBoxFlat_ryjg5")
|
||||
Button/styles/pressed = SubResource("StyleBoxFlat_fg72k")
|
||||
CheckButton/colors/font_pressed_color = Color(1, 1, 1, 1)
|
||||
CheckButton/styles/focus = SubResource("StyleBoxEmpty_ryjg5")
|
||||
CheckButton/styles/hover = SubResource("StyleBoxFlat_qi7qm")
|
||||
CheckButton/styles/hover_pressed = SubResource("StyleBoxFlat_iwc3v")
|
||||
CheckButton/styles/normal = SubResource("StyleBoxFlat_cq8do")
|
||||
CheckButton/styles/pressed = SubResource("StyleBoxFlat_8lbit")
|
|
@ -1,15 +1,11 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://dkxtwpcy4moyo"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://c6ceauyc42c33" path="res://menus/menu.tres" id="1_s0u37"]
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dkxtwpcy4moyo"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_d8v8v"]
|
||||
script/source = "extends Control
|
||||
|
||||
signal request_pause
|
||||
signal request_fullscreen
|
||||
signal request_restart
|
||||
signal request_quit
|
||||
|
||||
var settings_menu_scene := preload(\"res://menus/settings_menu.tscn\")
|
||||
|
||||
func _ready() -> void:
|
||||
var os_name = OS.get_name()
|
||||
|
@ -23,45 +19,16 @@ func _input(_event: InputEvent) -> void:
|
|||
func _on_btn_resume_pressed() -> void:
|
||||
request_pause.emit(false)
|
||||
|
||||
func _on_btn_fullscreen_pressed() -> void:
|
||||
request_fullscreen.emit()
|
||||
|
||||
func _on_btn_restart_pressed() -> void:
|
||||
request_restart.emit()
|
||||
|
||||
func _on_btn_settings_pressed() -> void:
|
||||
var settings := settings_menu_scene.instantiate()
|
||||
settings.connect(\"return_to_pause_menu\", exit_settings)
|
||||
$SettingsContainer.add_child(settings)
|
||||
$SettingsContainer.show()
|
||||
|
||||
func exit_settings() -> void:
|
||||
$SettingsContainer.hide()
|
||||
for child in $SettingsContainer.get_children():
|
||||
child.queue_free()
|
||||
|
||||
func _on_btn_quit_pressed() -> void:
|
||||
request_quit.emit()
|
||||
get_tree().quit()
|
||||
"
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_s0u37"]
|
||||
bg_color = Color(0.268015, 0.649122, 0.807649, 1)
|
||||
skew = Vector2(-0.1, 0.05)
|
||||
border_width_left = 5
|
||||
border_width_top = 5
|
||||
border_width_right = 5
|
||||
border_width_bottom = 5
|
||||
border_color = Color(1, 1, 1, 1)
|
||||
corner_radius_top_left = 12
|
||||
corner_radius_top_right = 12
|
||||
corner_radius_bottom_right = 12
|
||||
corner_radius_bottom_left = 12
|
||||
expand_margin_left = 20.0
|
||||
expand_margin_top = 8.0
|
||||
expand_margin_right = 20.0
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_s0u37"]
|
||||
font_size = 48
|
||||
outline_size = 8
|
||||
outline_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="PauseMenu" type="Control"]
|
||||
z_index = 2
|
||||
layout_mode = 3
|
||||
|
@ -71,80 +38,41 @@ anchor_bottom = 1.0
|
|||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 1
|
||||
theme = ExtResource("1_s0u37")
|
||||
script = SubResource("GDScript_d8v8v")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(1, 1, 0.666667, 0.0784314)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchors_preset = 14
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -171.5
|
||||
offset_top = -155.0
|
||||
offset_right = 171.5
|
||||
offset_bottom = 155.0
|
||||
offset_top = -50.5
|
||||
offset_bottom = 50.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/separation = 10
|
||||
alignment = 1
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_bottom = 40
|
||||
|
||||
[node name="Notice" type="Label" parent="VBoxContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_s0u37")
|
||||
text = "Paused!"
|
||||
label_settings = SubResource("LabelSettings_s0u37")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Btn_Resume" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 6
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Resume the game!"
|
||||
text = "RESUME game"
|
||||
|
||||
[node name="Btn_Settings" type="Button" parent="VBoxContainer"]
|
||||
[node name="Btn_Fullscreen" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Show the settings menu!"
|
||||
size_flags_vertical = 6
|
||||
text = "Toggle FULLSCREEN"
|
||||
|
||||
[node name="Btn_Restart" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 6
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Restart the level!"
|
||||
text = "RESTART the level"
|
||||
|
||||
[node name="Btn_Quit" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 6
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Quit to the main menu!"
|
||||
|
||||
[node name="SettingsContainer" type="ColorRect" parent="."]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.20871, 0.20871, 0.20871, 0.784314)
|
||||
text = "QUIT game"
|
||||
|
||||
[connection signal="pressed" from="VBoxContainer/Btn_Resume" to="." method="_on_btn_resume_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Btn_Settings" to="." method="_on_btn_settings_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Btn_Fullscreen" to="." method="_on_btn_fullscreen_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Btn_Restart" to="." method="_on_btn_restart_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Btn_Quit" to="." method="_on_btn_quit_pressed"]
|
||||
|
|
|
@ -1,151 +0,0 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://325sqcgcrf2r"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://c6ceauyc42c33" path="res://menus/menu.tres" id="1_83qjl"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_wbybg"]
|
||||
script/source = "extends Control
|
||||
|
||||
signal return_to_pause_menu
|
||||
|
||||
func _ready() -> void:
|
||||
$VBoxContainer/Fullscreen/CheckButton.button_pressed = Settings.fullscreen
|
||||
$VBoxContainer/SoundGravity/CheckButton.button_pressed = Settings.sound_on_gravity_change
|
||||
$VBoxContainer/VolumeMusic/HSlider.value = Settings.volume_music
|
||||
$VBoxContainer/VolumeSounds/HSlider.value = Settings.volume_sounds
|
||||
|
||||
func _on_fullscreen_check_button_toggled(toggled_on: bool) -> void:
|
||||
Settings.fullscreen = toggled_on
|
||||
|
||||
func _on_soundgravity_check_button_toggled(toggled_on: bool) -> void:
|
||||
Settings.sound_on_gravity_change = toggled_on
|
||||
|
||||
func _on_volumemusic_h_slider_value_changed(value: float) -> void:
|
||||
Settings.volume_music = int(value)
|
||||
|
||||
func _on_volumesounds_h_slider_value_changed(value: float) -> void:
|
||||
Settings.volume_sounds = int(value)
|
||||
|
||||
func _on_return_pressed() -> void:
|
||||
return_to_pause_menu.emit()
|
||||
"
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_83qjl"]
|
||||
bg_color = Color(1, 0.350068, 0.204326, 1)
|
||||
skew = Vector2(0.1, -0.05)
|
||||
border_width_left = 5
|
||||
border_width_top = 5
|
||||
border_width_right = 5
|
||||
border_width_bottom = 5
|
||||
border_color = Color(1, 1, 1, 1)
|
||||
corner_radius_top_left = 12
|
||||
corner_radius_top_right = 12
|
||||
corner_radius_bottom_right = 12
|
||||
corner_radius_bottom_left = 12
|
||||
expand_margin_left = 20.0
|
||||
expand_margin_top = 8.0
|
||||
expand_margin_right = 20.0
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_v0bl3"]
|
||||
font_size = 48
|
||||
outline_size = 8
|
||||
outline_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="SettingsMenu" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("1_83qjl")
|
||||
script = SubResource("GDScript_wbybg")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_constants/margin_bottom = 40
|
||||
|
||||
[node name="Notice" type="Label" parent="VBoxContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_83qjl")
|
||||
text = "Settings"
|
||||
label_settings = SubResource("LabelSettings_v0bl3")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Fullscreen" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
alignment = 1
|
||||
|
||||
[node name="CheckButton" type="CheckButton" parent="VBoxContainer/Fullscreen"]
|
||||
layout_mode = 2
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Fullscreen"
|
||||
|
||||
[node name="SoundGravity" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
alignment = 1
|
||||
|
||||
[node name="CheckButton" type="CheckButton" parent="VBoxContainer/SoundGravity"]
|
||||
layout_mode = 2
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Play sound on gravity change"
|
||||
|
||||
[node name="VolumeMusic" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/VolumeMusic"]
|
||||
layout_mode = 2
|
||||
text = "Music volume"
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="VBoxContainer/VolumeMusic"]
|
||||
custom_minimum_size = Vector2(200, 48)
|
||||
layout_mode = 2
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = -15.0
|
||||
max_value = 15.0
|
||||
|
||||
[node name="VolumeSounds" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/VolumeSounds"]
|
||||
layout_mode = 2
|
||||
text = "Sound volume"
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="VBoxContainer/VolumeSounds"]
|
||||
custom_minimum_size = Vector2(200, 48)
|
||||
layout_mode = 2
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = -15.0
|
||||
max_value = 15.0
|
||||
|
||||
[node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_constants/margin_top = 80
|
||||
|
||||
[node name="Return" type="Button" parent="VBoxContainer/MarginContainer2"]
|
||||
layout_mode = 2
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Return to the pause menu!"
|
||||
|
||||
[connection signal="toggled" from="VBoxContainer/Fullscreen/CheckButton" to="." method="_on_fullscreen_check_button_toggled"]
|
||||
[connection signal="toggled" from="VBoxContainer/SoundGravity/CheckButton" to="." method="_on_soundgravity_check_button_toggled"]
|
||||
[connection signal="value_changed" from="VBoxContainer/VolumeMusic/HSlider" to="." method="_on_volumemusic_h_slider_value_changed"]
|
||||
[connection signal="value_changed" from="VBoxContainer/VolumeSounds/HSlider" to="." method="_on_volumesounds_h_slider_value_changed"]
|
||||
[connection signal="pressed" from="VBoxContainer/MarginContainer2/Return" to="." method="_on_return_pressed"]
|
|
@ -78,13 +78,6 @@ restart_level={
|
|||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
display_map={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194326,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":9,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[physics]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue