mirror of
https://git.kittycat.homes/zoe/pegchamp.git
synced 2024-08-15 03:15:39 +00:00
some fixes
This commit is contained in:
parent
ffcccb8c2e
commit
6539056cfb
8 changed files with 135 additions and 98 deletions
|
@ -7,3 +7,6 @@ func _ready():
|
||||||
|
|
||||||
func _on_MusicVolumeSlider_value_changed(value):
|
func _on_MusicVolumeSlider_value_changed(value):
|
||||||
AudioServer.set_bus_volume_db(AudioServer.get_bus_index(bus_channel), linear2db(value))
|
AudioServer.set_bus_volume_db(AudioServer.get_bus_index(bus_channel), linear2db(value))
|
||||||
|
|
||||||
|
func save_volume():
|
||||||
|
Saves.save_game()
|
||||||
|
|
|
@ -16,4 +16,6 @@ __meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[connection signal="focus_exited" from="." to="." method="save_volume"]
|
||||||
|
[connection signal="mouse_exited" from="." to="." method="save_volume"]
|
||||||
[connection signal="value_changed" from="." to="." method="_on_MusicVolumeSlider_value_changed"]
|
[connection signal="value_changed" from="." to="." method="_on_MusicVolumeSlider_value_changed"]
|
||||||
|
|
111
Menu/LevelList.tscn
Normal file
111
Menu/LevelList.tscn
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Menu/Theme.tres" type="Theme" id=1]
|
||||||
|
[ext_resource path="res://icon.png" type="Texture" id=2]
|
||||||
|
[ext_resource path="res://Menu/Buttons/SceneSelectButton.tscn" type="PackedScene" id=5]
|
||||||
|
|
||||||
|
[node name="LevelList" type="ScrollContainer"]
|
||||||
|
margin_left = 176.0
|
||||||
|
margin_right = 368.0
|
||||||
|
margin_bottom = 165.0
|
||||||
|
theme = ExtResource( 1 )
|
||||||
|
follow_focus = true
|
||||||
|
scroll_horizontal_enabled = false
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="LevelListHBox" type="VBoxContainer" parent="."]
|
||||||
|
margin_left = 2.0
|
||||||
|
margin_top = 2.0
|
||||||
|
margin_right = 170.0
|
||||||
|
margin_bottom = 438.0
|
||||||
|
|
||||||
|
[node name="SceneSelectButton" parent="LevelListHBox" instance=ExtResource( 5 )]
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_right = 168.0
|
||||||
|
margin_bottom = 40.0
|
||||||
|
icon = ExtResource( 2 )
|
||||||
|
scene = "res://Stages/EmptyStage.tscn"
|
||||||
|
|
||||||
|
[node name="SceneSelectButton2" parent="LevelListHBox" instance=ExtResource( 5 )]
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 44.0
|
||||||
|
margin_right = 168.0
|
||||||
|
margin_bottom = 84.0
|
||||||
|
icon = ExtResource( 2 )
|
||||||
|
scene = "res://Stages/EmptyStage.tscn"
|
||||||
|
|
||||||
|
[node name="SceneSelectButton3" parent="LevelListHBox" instance=ExtResource( 5 )]
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 88.0
|
||||||
|
margin_right = 168.0
|
||||||
|
margin_bottom = 128.0
|
||||||
|
icon = ExtResource( 2 )
|
||||||
|
scene = "res://Stages/EmptyStage.tscn"
|
||||||
|
|
||||||
|
[node name="SceneSelectButton4" parent="LevelListHBox" instance=ExtResource( 5 )]
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 132.0
|
||||||
|
margin_right = 168.0
|
||||||
|
margin_bottom = 172.0
|
||||||
|
icon = ExtResource( 2 )
|
||||||
|
scene = "res://Stages/EmptyStage.tscn"
|
||||||
|
|
||||||
|
[node name="SceneSelectButton5" parent="LevelListHBox" instance=ExtResource( 5 )]
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 176.0
|
||||||
|
margin_right = 168.0
|
||||||
|
margin_bottom = 216.0
|
||||||
|
icon = ExtResource( 2 )
|
||||||
|
scene = "res://Stages/EmptyStage.tscn"
|
||||||
|
|
||||||
|
[node name="SceneSelectButton6" parent="LevelListHBox" instance=ExtResource( 5 )]
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 220.0
|
||||||
|
margin_right = 168.0
|
||||||
|
margin_bottom = 260.0
|
||||||
|
icon = ExtResource( 2 )
|
||||||
|
scene = "res://Stages/EmptyStage.tscn"
|
||||||
|
|
||||||
|
[node name="SceneSelectButton7" parent="LevelListHBox" instance=ExtResource( 5 )]
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 264.0
|
||||||
|
margin_right = 168.0
|
||||||
|
margin_bottom = 304.0
|
||||||
|
icon = ExtResource( 2 )
|
||||||
|
scene = "res://Stages/EmptyStage.tscn"
|
||||||
|
|
||||||
|
[node name="SceneSelectButton8" parent="LevelListHBox" instance=ExtResource( 5 )]
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 308.0
|
||||||
|
margin_right = 168.0
|
||||||
|
margin_bottom = 348.0
|
||||||
|
icon = ExtResource( 2 )
|
||||||
|
scene = "res://Stages/EmptyStage.tscn"
|
||||||
|
|
||||||
|
[node name="SceneSelectButton9" parent="LevelListHBox" instance=ExtResource( 5 )]
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 352.0
|
||||||
|
margin_right = 168.0
|
||||||
|
margin_bottom = 392.0
|
||||||
|
icon = ExtResource( 2 )
|
||||||
|
scene = "res://Stages/EmptyStage.tscn"
|
||||||
|
|
||||||
|
[node name="SceneSelectButton10" parent="LevelListHBox" instance=ExtResource( 5 )]
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 396.0
|
||||||
|
margin_right = 168.0
|
||||||
|
margin_bottom = 436.0
|
||||||
|
icon = ExtResource( 2 )
|
||||||
|
scene = "res://Stages/EmptyStage.tscn"
|
|
@ -1,13 +1,11 @@
|
||||||
[gd_scene load_steps=14 format=2]
|
[gd_scene load_steps=12 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Menu/Theme.tres" type="Theme" id=1]
|
[ext_resource path="res://Menu/Theme.tres" type="Theme" id=1]
|
||||||
[ext_resource path="res://Menu/Buttons/SceneSelectButton.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://Menu/LevelList.tscn" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://Effects/FadeIn.tscn" type="PackedScene" id=3]
|
[ext_resource path="res://Effects/FadeIn.tscn" type="PackedScene" id=3]
|
||||||
[ext_resource path="res://Cannon/Cannon.tscn" type="PackedScene" id=4]
|
[ext_resource path="res://Cannon/Cannon.tscn" type="PackedScene" id=4]
|
||||||
[ext_resource path="res://Menu/Buttons/Fullscreen/FullscreenButton.tscn" type="PackedScene" id=5]
|
[ext_resource path="res://Menu/Buttons/Fullscreen/FullscreenButton.tscn" type="PackedScene" id=5]
|
||||||
[ext_resource path="res://icon.png" type="Texture" id=6]
|
|
||||||
[ext_resource path="res://Menu/LevelInfo.tscn" type="PackedScene" id=7]
|
[ext_resource path="res://Menu/LevelInfo.tscn" type="PackedScene" id=7]
|
||||||
[ext_resource path="res://Pegs/Pink/Pink.png" type="Texture" id=8]
|
|
||||||
[ext_resource path="res://Menu/Buttons/AudioSliders/VolumeSlider.tscn" type="PackedScene" id=9]
|
[ext_resource path="res://Menu/Buttons/AudioSliders/VolumeSlider.tscn" type="PackedScene" id=9]
|
||||||
[ext_resource path="res://Menu/Buttons/AudioSliders/MusicVolume1.png" type="Texture" id=10]
|
[ext_resource path="res://Menu/Buttons/AudioSliders/MusicVolume1.png" type="Texture" id=10]
|
||||||
[ext_resource path="res://Menu/Buttons/AudioSliders/MusicVolume2.png" type="Texture" id=11]
|
[ext_resource path="res://Menu/Buttons/AudioSliders/MusicVolume2.png" type="Texture" id=11]
|
||||||
|
@ -103,96 +101,13 @@ __meta__ = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="LevelInfo" parent="Control/TabContainer/Levels/HBoxContainer" instance=ExtResource( 7 )]
|
[node name="LevelInfo" parent="Control/TabContainer/Levels/HBoxContainer" instance=ExtResource( 7 )]
|
||||||
margin_left = 157.0
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_left = 55.0
|
||||||
margin_right = 172.0
|
margin_right = 172.0
|
||||||
|
|
||||||
[node name="LevelList" type="ScrollContainer" parent="Control/TabContainer/Levels/HBoxContainer"]
|
|
||||||
margin_left = 176.0
|
|
||||||
margin_right = 368.0
|
|
||||||
margin_bottom = 165.0
|
margin_bottom = 165.0
|
||||||
theme = ExtResource( 1 )
|
|
||||||
follow_focus = true
|
|
||||||
scroll_horizontal_enabled = false
|
|
||||||
|
|
||||||
[node name="LevelListHBox" type="VBoxContainer" parent="Control/TabContainer/Levels/HBoxContainer/LevelList"]
|
[node name="LevelList" parent="Control/TabContainer/Levels/HBoxContainer" instance=ExtResource( 2 )]
|
||||||
margin_left = 2.0
|
|
||||||
margin_top = 2.0
|
|
||||||
margin_right = 170.0
|
|
||||||
margin_bottom = 335.0
|
|
||||||
|
|
||||||
[node name="LevelSelectButton" parent="Control/TabContainer/Levels/HBoxContainer/LevelList/LevelListHBox" instance=ExtResource( 2 )]
|
|
||||||
anchor_right = 0.0
|
|
||||||
anchor_bottom = 0.0
|
|
||||||
margin_right = 168.0
|
|
||||||
margin_bottom = 25.0
|
|
||||||
icon = ExtResource( 8 )
|
|
||||||
scene = "res://Stages/EmptyStage.tscn"
|
|
||||||
|
|
||||||
[node name="LevelSelectButton3" parent="Control/TabContainer/Levels/HBoxContainer/LevelList/LevelListHBox" instance=ExtResource( 2 )]
|
|
||||||
anchor_right = 0.0
|
|
||||||
anchor_bottom = 0.0
|
|
||||||
margin_top = 29.0
|
|
||||||
margin_right = 168.0
|
|
||||||
margin_bottom = 69.0
|
|
||||||
icon = ExtResource( 6 )
|
|
||||||
scene = "res://Stages/EmptyStage.tscn"
|
|
||||||
unlock_points_required = 10
|
|
||||||
|
|
||||||
[node name="LevelSelectButton4" parent="Control/TabContainer/Levels/HBoxContainer/LevelList/LevelListHBox" instance=ExtResource( 2 )]
|
|
||||||
anchor_right = 0.0
|
|
||||||
anchor_bottom = 0.0
|
|
||||||
margin_top = 73.0
|
|
||||||
margin_right = 168.0
|
|
||||||
margin_bottom = 113.0
|
|
||||||
text = "> piss"
|
|
||||||
icon = ExtResource( 6 )
|
|
||||||
scene = "res://Stages/EmptyStage.tscn"
|
|
||||||
unlock_points_required = 20
|
|
||||||
|
|
||||||
[node name="LevelSelectButton5" parent="Control/TabContainer/Levels/HBoxContainer/LevelList/LevelListHBox" instance=ExtResource( 2 )]
|
|
||||||
anchor_right = 0.0
|
|
||||||
anchor_bottom = 0.0
|
|
||||||
margin_top = 117.0
|
|
||||||
margin_right = 168.0
|
|
||||||
margin_bottom = 157.0
|
|
||||||
icon = ExtResource( 6 )
|
|
||||||
scene = "res://Stages/EmptyStage.tscn"
|
|
||||||
|
|
||||||
[node name="LevelSelectButton6" parent="Control/TabContainer/Levels/HBoxContainer/LevelList/LevelListHBox" instance=ExtResource( 2 )]
|
|
||||||
anchor_right = 0.0
|
|
||||||
anchor_bottom = 0.0
|
|
||||||
margin_top = 161.0
|
|
||||||
margin_right = 168.0
|
|
||||||
margin_bottom = 201.0
|
|
||||||
icon = ExtResource( 6 )
|
|
||||||
scene = "res://Stages/EmptyStage.tscn"
|
|
||||||
|
|
||||||
[node name="LevelSelectButton7" parent="Control/TabContainer/Levels/HBoxContainer/LevelList/LevelListHBox" instance=ExtResource( 2 )]
|
|
||||||
anchor_right = 0.0
|
|
||||||
anchor_bottom = 0.0
|
|
||||||
margin_top = 205.0
|
|
||||||
margin_right = 168.0
|
|
||||||
margin_bottom = 245.0
|
|
||||||
icon = ExtResource( 6 )
|
|
||||||
scene = "res://Stages/EmptyStage.tscn"
|
|
||||||
|
|
||||||
[node name="LevelSelectButton8" parent="Control/TabContainer/Levels/HBoxContainer/LevelList/LevelListHBox" instance=ExtResource( 2 )]
|
|
||||||
anchor_right = 0.0
|
|
||||||
anchor_bottom = 0.0
|
|
||||||
margin_top = 249.0
|
|
||||||
margin_right = 168.0
|
|
||||||
margin_bottom = 289.0
|
|
||||||
icon = ExtResource( 6 )
|
|
||||||
scene = "res://Stages/EmptyStage.tscn"
|
|
||||||
|
|
||||||
[node name="LevelSelectButton9" parent="Control/TabContainer/Levels/HBoxContainer/LevelList/LevelListHBox" instance=ExtResource( 2 )]
|
|
||||||
anchor_right = 0.0
|
|
||||||
anchor_bottom = 0.0
|
|
||||||
margin_top = 293.0
|
|
||||||
margin_right = 168.0
|
|
||||||
margin_bottom = 333.0
|
|
||||||
icon = ExtResource( 6 )
|
|
||||||
scene = "res://Stages/EmptyStage.tscn"
|
|
||||||
|
|
||||||
[node name="Transition" parent="." instance=ExtResource( 3 )]
|
[node name="Transition" parent="." instance=ExtResource( 3 )]
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,8 @@ export var already_beaten = false
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
load_level()
|
load_level()
|
||||||
$Killzone.connect("level_just_won", self, "save_level")
|
var _killzone_connec = $Killzone.connect("level_just_won", self, "save_level")
|
||||||
GameStats.multiplier = 1
|
GameStats.multiplier = 1
|
||||||
print(high_score)
|
|
||||||
|
|
||||||
func _physics_process(_delta):
|
func _physics_process(_delta):
|
||||||
fast_forward()
|
fast_forward()
|
||||||
|
@ -43,7 +42,7 @@ func save_level():
|
||||||
|
|
||||||
|
|
||||||
if GameStats.score > high_score:
|
if GameStats.score > high_score:
|
||||||
print("New High score!")
|
# new highscore!!!
|
||||||
high_score = GameStats.score
|
high_score = GameStats.score
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
|
|
|
@ -7,7 +7,9 @@ func _ready():
|
||||||
|
|
||||||
func save_game():
|
func save_game():
|
||||||
var data = {
|
var data = {
|
||||||
"unlock_points" : GameStats.unlock_points
|
"unlock_points" : GameStats.unlock_points,
|
||||||
|
"music_volume" : AudioServer.get_bus_volume_db(AudioServer.get_bus_index("Music")),
|
||||||
|
"sfx_volume" : AudioServer.get_bus_volume_db(AudioServer.get_bus_index("SFX"))
|
||||||
}
|
}
|
||||||
|
|
||||||
print(data)
|
print(data)
|
||||||
|
@ -26,6 +28,11 @@ func load_game():
|
||||||
var data = file.get_var()
|
var data = file.get_var()
|
||||||
file.close()
|
file.close()
|
||||||
load_unlock_points(data)
|
load_unlock_points(data)
|
||||||
|
load_volume(data)
|
||||||
|
|
||||||
func load_unlock_points(data):
|
func load_unlock_points(data):
|
||||||
GameStats.unlock_points = data.unlock_points
|
GameStats.unlock_points = data.unlock_points
|
||||||
|
|
||||||
|
func load_volume(data):
|
||||||
|
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("SFX"), data.sfx_volume)
|
||||||
|
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Music"), data.music_volume)
|
||||||
|
|
|
@ -5,11 +5,11 @@ bus/1/name = "SFX"
|
||||||
bus/1/solo = false
|
bus/1/solo = false
|
||||||
bus/1/mute = false
|
bus/1/mute = false
|
||||||
bus/1/bypass_fx = false
|
bus/1/bypass_fx = false
|
||||||
bus/1/volume_db = 0.207247
|
bus/1/volume_db = -5.04224
|
||||||
bus/1/send = "Master"
|
bus/1/send = "Master"
|
||||||
bus/2/name = "Music"
|
bus/2/name = "Music"
|
||||||
bus/2/solo = false
|
bus/2/solo = false
|
||||||
bus/2/mute = false
|
bus/2/mute = false
|
||||||
bus/2/bypass_fx = false
|
bus/2/bypass_fx = false
|
||||||
bus/2/volume_db = -80.0
|
bus/2/volume_db = -5.04224
|
||||||
bus/2/send = "Master"
|
bus/2/send = "Master"
|
||||||
|
|
|
@ -32,7 +32,7 @@ custom_features=""
|
||||||
export_filter="all_resources"
|
export_filter="all_resources"
|
||||||
include_filter=""
|
include_filter=""
|
||||||
exclude_filter=""
|
exclude_filter=""
|
||||||
export_path=""
|
export_path="../pegchampBuild/pegchamp.exe"
|
||||||
script_export_mode=1
|
script_export_mode=1
|
||||||
script_encryption_key=""
|
script_encryption_key=""
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue