Remove debug mode and fix checkpoint location and orientation on level

soundtrack
Ensar Sarajčić 2021-11-20 17:19:39 +01:00
parent 9d1ddac430
commit a86b2d8434
5 changed files with 29 additions and 69 deletions

View File

@ -15,8 +15,6 @@ onready var auto_clutch_cb: CheckBox = $MarginContainer/VSplitContainer/CenterCo
# gdlint: ignore=max-line-length
onready var automatic_transmission_cb: CheckBox = $MarginContainer/VSplitContainer/CenterContainer/VBoxContainer/AutomaticTransmissionCheckBox
# gdlint: ignore=max-line-length
onready var debug_cb: CheckBox = $MarginContainer/VSplitContainer/CenterContainer/VBoxContainer/DebugModeCheckBox
# gdlint: ignore=max-line-length
onready var fullscreen_cb: CheckBox = $MarginContainer/VSplitContainer/CenterContainer/VBoxContainer/FullscreenCheckBox
# gdlint: ignore=max-line-length
onready var borderless_cb: CheckBox = $MarginContainer/VSplitContainer/CenterContainer/VBoxContainer/BorderlessCheckBox
@ -26,7 +24,6 @@ func _ready() -> void:
master_slider.value = db2linear(AudioServer.get_bus_volume_db(master_bus))
sound_slider.value = db2linear(AudioServer.get_bus_volume_db(sound_bus))
music_slider.value = db2linear(AudioServer.get_bus_volume_db(music_bus))
debug_cb.pressed = GlobalSettings.debug
auto_clutch_cb.pressed = GlobalSettings.auto_clutch
automatic_transmission_cb.pressed = GlobalSettings.automatic_transmission
fullscreen_cb.pressed = false
@ -37,10 +34,6 @@ func _ready() -> void:
_set_borderless(true)
func _on_debug_toggled(new_state: bool) -> void:
GlobalSettings.debug = new_state
func _on_autoclutch_toggled(new_state: bool) -> void:
GlobalSettings.auto_clutch = new_state

View File

@ -35,7 +35,7 @@ margin_bottom = -20.0
[node name="VSplitContainer" type="VSplitContainer" parent="MarginContainer"]
margin_right = 984.0
margin_bottom = 714.0
margin_bottom = 615.0
dragger_visibility = 1
[node name="HSplitContainer" type="HSplitContainer" parent="MarginContainer/VSplitContainer"]
@ -60,15 +60,15 @@ valign = 1
[node name="CenterContainer" type="CenterContainer" parent="MarginContainer/VSplitContainer"]
margin_top = 96.0
margin_right = 984.0
margin_bottom = 714.0
margin_bottom = 615.0
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VSplitContainer/CenterContainer"]
margin_left = 311.0
margin_right = 672.0
margin_bottom = 618.0
margin_left = 356.0
margin_right = 627.0
margin_bottom = 519.0
[node name="Gameplay" type="Label" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_right = 361.0
margin_right = 271.0
margin_bottom = 27.0
custom_fonts/font = SubResource( 4 )
text = "Gameplay"
@ -79,7 +79,7 @@ __meta__ = {
[node name="AutoClutchCheckBox" type="CheckBox" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 35.0
margin_right = 361.0
margin_right = 271.0
margin_bottom = 83.0
custom_fonts/font = SubResource( 3 )
text = "Automatic Clutch"
@ -90,7 +90,7 @@ __meta__ = {
[node name="AutomaticTransmissionCheckBox" type="CheckBox" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 91.0
margin_right = 361.0
margin_right = 271.0
margin_bottom = 139.0
custom_fonts/font = SubResource( 3 )
text = "Automatic Transmission"
@ -101,7 +101,7 @@ __meta__ = {
[node name="AudioLabel" type="Label" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 147.0
margin_right = 361.0
margin_right = 271.0
margin_bottom = 174.0
custom_fonts/font = SubResource( 4 )
text = "Audio"
@ -109,7 +109,7 @@ align = 1
[node name="MasterLabel" type="Label" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 182.0
margin_right = 361.0
margin_right = 271.0
margin_bottom = 200.0
custom_fonts/font = SubResource( 5 )
text = "Master"
@ -120,7 +120,7 @@ __meta__ = {
[node name="MasterSlider" type="HSlider" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 208.0
margin_right = 361.0
margin_right = 271.0
margin_bottom = 240.0
max_value = 1.0
step = 0.05
@ -131,7 +131,7 @@ __meta__ = {
[node name="SoundEffectsLabel" type="Label" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 248.0
margin_right = 361.0
margin_right = 271.0
margin_bottom = 266.0
custom_fonts/font = SubResource( 5 )
text = "Sound Effects"
@ -142,7 +142,7 @@ __meta__ = {
[node name="SoundEffectsSlider" type="HSlider" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 274.0
margin_right = 361.0
margin_right = 271.0
margin_bottom = 306.0
max_value = 1.0
step = 0.05
@ -153,7 +153,7 @@ __meta__ = {
[node name="MusicLabel" type="Label" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 314.0
margin_right = 361.0
margin_right = 271.0
margin_bottom = 332.0
custom_fonts/font = SubResource( 5 )
text = "Music"
@ -164,7 +164,7 @@ __meta__ = {
[node name="MusicSlider" type="HSlider" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 340.0
margin_right = 361.0
margin_right = 271.0
margin_bottom = 372.0
max_value = 1.0
step = 0.05
@ -175,7 +175,7 @@ __meta__ = {
[node name="VideoLabel" type="Label" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 380.0
margin_right = 361.0
margin_right = 271.0
margin_bottom = 407.0
custom_fonts/font = SubResource( 4 )
text = "Video"
@ -183,7 +183,7 @@ align = 1
[node name="FullscreenCheckBox" type="CheckBox" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 415.0
margin_right = 361.0
margin_right = 271.0
margin_bottom = 463.0
custom_fonts/font = SubResource( 3 )
text = "Fullscreen"
@ -194,7 +194,7 @@ __meta__ = {
[node name="BorderlessCheckBox" type="CheckBox" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 471.0
margin_right = 361.0
margin_right = 271.0
margin_bottom = 519.0
custom_fonts/font = SubResource( 3 )
text = "Borderless"
@ -203,27 +203,6 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="DebugLabel" type="Label" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 527.0
margin_right = 361.0
margin_bottom = 554.0
custom_fonts/font = SubResource( 4 )
text = "Debug"
align = 1
[node name="DebugModeCheckBox" type="CheckBox" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 562.0
margin_right = 361.0
margin_bottom = 610.0
custom_fonts/font = SubResource( 3 )
text = "Debug mode (visible checkpoints)"
align = 1
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer"]
margin_top = 618.0
margin_right = 361.0
margin_bottom = 618.0
[connection signal="pressed" from="MarginContainer/VSplitContainer/HSplitContainer/BackButton" to="." method="_on_BackButton_pressed"]
[connection signal="toggled" from="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer/AutoClutchCheckBox" to="." method="_on_autoclutch_toggled"]
[connection signal="toggled" from="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer/AutomaticTransmissionCheckBox" to="." method="_on_automatictransmission_toggled"]
@ -232,4 +211,3 @@ margin_bottom = 618.0
[connection signal="value_changed" from="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer/MusicSlider" to="." method="_on_MusicSlider_value_changed"]
[connection signal="toggled" from="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer/FullscreenCheckBox" to="." method="_on_fullscreen_toggled"]
[connection signal="toggled" from="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer/BorderlessCheckBox" to="." method="_on_borderless_toggled"]
[connection signal="toggled" from="MarginContainer/VSplitContainer/CenterContainer/VBoxContainer/DebugModeCheckBox" to="." method="_on_debug_toggled"]

View File

@ -5,7 +5,7 @@
[sub_resource type="Curve3D" id=4]
_data = {
"points": PoolVector3Array( 0, 0, 0, 0, 0, 0, 14.216, 39.4324, 71.6595, 0, 0, 0, 0, 0, 0, 48.497, 32.0944, 57.4446, 0, 0, 0, 0, 0, 0, 63.2095, 34.3302, 15.7474, 0, 0, 0, 0, 0, 0, 52.1399, 31.6108, -13.5262, 0, 0, 0, 0, 0, 0, 24.6326, 28.4639, -50.053, 23.6642, 2.81437, -11.3263, -23.6642, -2.81437, 11.3263, -27.2831, 20.865, -58.278, 13.9886, 2.61135, -22.1052, -13.9886, -2.61135, 22.1052, -57.3715, 19.9951, -34.0108, 0, 0, 0, 0, 0, 0, -55.8672, 12.2, 4.13316, 0, 0, 0, 0, 0, 0, -43.3482, 10.9209, 32.963, 0, 0, 0, 0, 0, 0, -8.39052, 10.014, 49.1887, 0, 0, 0, 0, 0, 0, 21.4522, 8.65878, 34.7661, 0, 0, 0, 0, 0, 0, 40.2058, 0, 6.92621, 0, 0, 0, 0, 0, 0, 40.8815, 0, -14.6971, 0, 0, 0, 0, 0, 0, 23.3126, 0, -42.064, 0, 0, 0, 0, 0, 0, 10.4817, 0, -41.5338, 0, 0, 0, 0, 0, 0, -17.5689, 0, -40.3747, 0, 0, 0, 0, 0, 0, -34.1963, -9.99896, -28.4392, 0, 0, 0, 0, 0, 0, -35.0374, -17.5733, 0.755226, -25.1643, -4.15447, -7.00803, 25.1643, 4.15447, 7.00803, -25.3277, -17.0155, 35.5891, -31.1923, 0.679697, 9.17976, 31.1923, -0.679697, -9.17976, 32.5606, -14.9507, 34.5135, 12.799, 2.25521, 21.396, -12.799, -2.25521, -21.396, 94.622, -21.5309, -8.64266, 22.7995, 6.03879, 7.95921, -22.7995, -6.03879, -7.95921, 48.1915, -51.2168, -78.3252, 19.6079, 3.36048, -7.09978, -19.6079, -3.36048, 7.09978, -9.52077, -51.4458, -96.3843, 0, 0, 0, 0, 0, 0, -75.738, -51.7315, -69.4881, -19.5447, 7.40563, -123.686, 19.5447, -7.40563, 123.686, -111.384, -52.9403, -0.640272, -20.5081, -7.15141, 4.13271, 20.5081, 7.15141, -4.13271, -0.272314, -41.7673, 38.5707, -6.85563, 1.04683, 8.9799, 6.85563, -1.04683, -8.9799, 25.8795, -40.0437, 1.30272, 0, 0, 0, 0, 0, 0, 25.7356, -35.7572, -35.2028, 24.8742, -2.83045, 4.38934, -24.8742, 2.83045, -4.38934, 10.7914, -19.7015, -72.2903, 0, 0, 0, 0, 0, 0, -36.1634, -18.286, -75.8325, 0, 0, 0, 0, 0, 0, -88.1544, -27.7213, -59.939, -4.80772, -11.8088, -46.0525, 4.80772, 11.8088, 46.0525, -125.849, -7.63193, -14.1127, 0, 0, 0, 0, 0, 0, -103.239, -7.89527, 49.2235, 0, 0, 0, 0, 0, 0, -56.7135, -9.16963, 78.2503, -19.945, -1.47294, -6.20989, 19.945, 1.47294, 6.20989, -17.1642, -3.8681, 98.5664, -17.4425, -7.26221, 0.510544, 17.4425, 7.26221, -0.510544, 40.278, -0.352409, 87.5018, -18.589, -11.2058, 5.2025, 18.589, 11.2058, -5.2025, 83.364, 7.04305, 73.1424, -15.6005, -1.56422, 29.2132, 15.6005, 1.56422, -29.2132, 127.511, 18.2447, 10.7672, 13.9779, -21.9478, 42.154, -13.9779, 21.9478, -42.154, 124.034, 29.2792, -82.4309, 35.0404, -1.58311, 22.4948, -35.0404, 1.58311, -22.4948, 74.3478, 58.2156, -162.005, 37.4588, 1.0821, -12.1337, -37.4588, -1.0821, 12.1337, -52.9686, 64.7964, -176.08, 56.0781, 4.44358, -54.6466, -56.0781, -4.44358, 54.6466, -150.169, 50.2784, -91.5872, 0, 0, 0, 0, 0, 0, -160.337, 46.2063, 19.0639, -28.4822, -5.91084, -24.8541, 28.4822, 5.91084, 24.8541, -103.293, 36.1836, 85.952, 0, 0, 0, 0, 0, 0, -51.992, 40.1074, 108.911, 0, 0, 0, 0, 0, 0, -20.3378, 34.0526, 93.3445, -22.3177, -2.73847, -8.35827, 22.3177, 2.73847, 8.35827, -3.68909, 39.4619, 74.5694 ),
"points": PoolVector3Array( 0, 0, 0, 0, 0, 0, 14.216, 39.4324, 71.6595, 0, 0, 0, 0, 0, 0, 48.497, 32.0944, 57.4446, 0, 0, 0, 0, 0, 0, 63.2095, 34.3302, 15.7474, 0, 0, 0, 0, 0, 0, 52.1399, 31.6108, -13.5262, 0, 0, 0, 0, 0, 0, 24.6326, 28.4639, -50.053, 23.6642, 2.81437, -11.3263, -23.6642, -2.81437, 11.3263, -27.2831, 20.865, -58.278, 13.9886, 2.61135, -22.1052, -13.9886, -2.61135, 22.1052, -57.3715, 19.9951, -34.0108, 0, 0, 0, 0, 0, 0, -55.8672, 12.2, 4.13316, 0, 0, 0, 0, 0, 0, -43.3482, 10.9209, 32.963, 0, 0, 0, 0, 0, 0, -8.39052, 10.014, 49.1887, 0, 0, 0, 0, 0, 0, 21.4522, 8.65878, 34.7661, 0, 0, 0, 0, 0, 0, 40.2058, 0, 6.92621, 0, 0, 0, 0, 0, 0, 40.8815, 0, -14.6971, 0, 0, 0, 0, 0, 0, 23.3126, 0, -42.064, 0, 0, 0, 0, 0, 0, 10.4817, 0, -41.5338, 0, 0, 0, 0, 0, 0, -17.5689, 0, -40.3747, 0, 0, 0, 0, 0, 0, -34.1963, -9.99896, -28.4392, 0, 0, 0, 0, 0, 0, -35.0374, -17.5733, 0.755226, -25.1643, -4.15447, -7.00803, 25.1643, 4.15447, 7.00803, -25.3277, -17.0155, 35.5891, -31.1923, 0.679697, 9.17976, 31.1923, -0.679697, -9.17976, 32.5606, -14.9507, 34.5135, 12.799, 2.25521, 21.396, -12.799, -2.25521, -21.396, 94.622, -21.5309, -8.64266, 22.7995, 6.03879, 7.95921, -22.7995, -6.03879, -7.95921, 48.1915, -51.2168, -78.3252, 19.6079, 3.36048, -7.09978, -19.6079, -3.36048, 7.09978, -9.52077, -51.4458, -96.3843, 0, 0, 0, 0, 0, 0, -75.738, -51.7315, -69.4881, -19.5447, 7.40563, -123.686, 19.5447, -7.40563, 123.686, -111.384, -52.9403, -0.640272, -20.5081, -7.15141, 4.13271, 20.5081, 7.15141, -4.13271, -0.272314, -41.7673, 38.5707, -6.85563, 1.04683, 8.9799, 6.85563, -1.04683, -8.9799, 25.8795, -40.0437, 1.30272, 0, 0, 0, 0, 0, 0, 25.7356, -35.7572, -35.2028, 24.8742, -2.83045, 4.38934, -24.8742, 2.83045, -4.38934, 10.7914, -19.7015, -72.2903, 0, 0, 0, 0, 0, 0, -36.1634, -18.286, -75.8325, 0, 0, 0, 0, 0, 0, -88.1544, -27.7213, -59.939, -4.80772, -11.8088, -46.0525, 4.80772, 11.8088, 46.0525, -125.849, -7.63193, -14.1127, 0, 0, 0, 0, 0, 0, -103.239, -7.89527, 49.2235, 0, 0, 0, 0, 0, 0, -56.7135, -9.16963, 78.2503, -19.945, -1.47294, -6.20989, 19.945, 1.47294, 6.20989, -17.1642, -3.8681, 98.5664, -17.4425, -7.26221, 0.510544, 17.4425, 7.26221, -0.510544, 40.278, -0.352409, 87.5018, -18.589, -11.2058, 5.2025, 18.589, 11.2058, -5.2025, 83.364, 7.04305, 73.1424, -15.6005, -1.56422, 29.2132, 15.6005, 1.56422, -29.2132, 127.511, 18.2447, 10.7672, 13.9779, -21.9478, 42.154, -13.9779, 21.9478, -42.154, 124.034, 29.2792, -82.4309, 35.0404, -1.58311, 22.4948, -35.0404, 1.58311, -22.4948, 74.3478, 58.2156, -162.005, 37.4588, 1.0821, -12.1337, -37.4588, -1.0821, 12.1337, -52.9686, 64.7964, -176.08, 56.0781, 4.44358, -54.6466, -56.0781, -4.44358, 54.6466, -150.169, 50.2784, -91.5872, 0, 0, 0, 0, 0, 0, -160.337, 46.2063, 19.0639, -28.4822, -5.91084, -24.8541, 28.4822, 5.91084, 24.8541, -103.293, 36.1836, 85.952, 0, 0, 0, 0, 0, 0, -51.992, 40.1074, 108.911, -20.4424, 0.454487, 0.42263, 20.4424, -0.454487, -0.42263, -27.8207, 35.3079, 87.4098, -22.3177, -2.73847, -8.35827, 22.3177, 2.73847, 8.35827, -3.68909, 39.4619, 74.5694 ),
"tilts": PoolRealArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
}
@ -59,8 +59,8 @@ shader_param/specular = 0.5
shader_param/metallic = 0.0
shader_param/roughness = 1.0
shader_param/point_size = 1.0
shader_param/uv1_scale = Vector3( 5, 50, 0 )
shader_param/uv1_offset = Vector3( 0.14, -0.525, 0 )
shader_param/uv1_scale = Vector3( 1, 100, 0 )
shader_param/uv1_offset = Vector3( 0, 0, 0 )
shader_param/uv2_scale = Vector3( 1, 1, 1 )
shader_param/uv2_offset = Vector3( 0, 0, 0 )
shader_param/texture_albedo = ExtResource( 2 )
@ -82,15 +82,13 @@ extents = Vector3( 226.72, 25.6138, 197.933 )
[node name="Spatial" instance=ExtResource( 1 )]
[node name="PlayerSpawnLocation" parent="." index="1"]
transform = Transform( -0.726143, 0, 0.687544, 0, 1, 0, -0.687544, 0, -0.726143, 3.26113, 52.1483, 95.1165 )
transform = Transform( -0.440065, 0, 0.897966, 0, 1, 0, -0.897966, 0, -0.440065, -28.0465, 52.1483, 87.0188 )
[node name="Track" parent="." index="2"]
track_path = NodePath("../Path")
checkpoint_count = 30
checkpoint_dim = Vector2( 25, 25 )
[node name="Path" type="Path" parent="." index="3"]
transform = Transform( 1.06734, 0, 0, 0, 1.06734, 0, 0, 0, 1.06734, 8.02585, 1.25703, 17.8349 )
curve = SubResource( 4 )
[node name="Track" type="CSGPolygon" parent="Path" index="0"]

View File

@ -7,8 +7,10 @@ signal wrong_way
export(NodePath) var track_path = null
export(int, 10, 50) var checkpoint_count = 20
export(Vector2) var checkpoint_dim = Vector2(20, 15)
export(Material) var debug_material = null
export(float) var checkpoint_depth = 5.0
export(PoolVector2Array) var checkpoint_polygon = PoolVector2Array(
[Vector2(-10, -10), Vector2(-10, 10), Vector2(10, 10), Vector2(10, -10)]
)
var furthest_checkpoint = -1
var last_checkpoint = -1
@ -39,14 +41,6 @@ func _ready() -> void:
)
section += section_size
checkpoints.add_child(new_checkpoint)
if GlobalSettings.debug:
var mesh = CubeMesh.new()
mesh.size = Vector3(checkpoint_dim.x, checkpoint_dim.y, 5)
if debug_material != null:
mesh.material = debug_material
var meshinst = MeshInstance.new()
meshinst.mesh = mesh
new_checkpoint.add_child(meshinst)
new_checkpoint.connect("body_entered", self, "_on_body_entered_area", [new_checkpoint])
checkpoints.global_transform.origin = path.global_transform.origin
@ -74,11 +68,9 @@ func _on_body_entered_area(body: Node, area: Area) -> void:
func _build_checkpoint_collision():
var collision = CollisionShape.new()
var shape = CylinderShape.new()
shape.radius = checkpoint_dim.x
shape.height = checkpoint_dim.y
collision.shape = shape
var collision = CollisionPolygon.new()
collision.depth = checkpoint_depth
collision.polygon = checkpoint_polygon
return collision

View File

@ -1,5 +1,4 @@
extends Node
var debug: bool = false
var auto_clutch: bool = false
var automatic_transmission: bool = true