feat(game): refactor ball state and turn handling
* Replace `valid_end` with `is_foul` for invalid ball sinks * Rename and centralize ball state tracking * Add ball finalization and win-condition hooks * Update turn switching to retain the player after valid sinks * Apply negative points to reaped balls * Add active-player indicator to the camera UI * Emit active-player updates when the turn changes
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://w3vh1gj6t2k2"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://w3vh1gj6t2k2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bpf107mmjiswh" path="res://scenes/menus/camera/camera_controller.gd" id="1_mvpa7"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_mvpa7"]
|
||||
font_size = 24
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_duxs1"]
|
||||
font_color = Color(0, 1, 0.14117648, 1)
|
||||
|
||||
[node name="camera_controller" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
@@ -66,7 +69,27 @@ mouse_default_cursor_shape = 2
|
||||
text = "<Next>"
|
||||
flat = true
|
||||
|
||||
[node name="reset_bttn" type="Button" parent="margin_container/vbox"]
|
||||
[node name="hbox2" type="HBoxContainer" parent="margin_container/vbox"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="hbox" type="HBoxContainer" parent="margin_container/vbox/hbox2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="active_lbl" type="Label" parent="margin_container/vbox/hbox2/hbox"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "Active"
|
||||
label_settings = SubResource("LabelSettings_duxs1")
|
||||
uppercase = true
|
||||
|
||||
[node name="hbox2" type="HBoxContainer" parent="margin_container/vbox/hbox2"]
|
||||
clip_contents = true
|
||||
custom_minimum_size = Vector2(149, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="reset_bttn" type="Button" parent="margin_container/vbox/hbox2/hbox2"]
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
mouse_default_cursor_shape = 2
|
||||
@@ -76,4 +99,4 @@ alignment = 0
|
||||
|
||||
[connection signal="pressed" from="margin_container/vbox/hbox/hbox2/prev_bttn" to="." method="_on_prev_bttn_pressed"]
|
||||
[connection signal="pressed" from="margin_container/vbox/hbox/hbox2/next_bttn" to="." method="_on_next_bttn_pressed"]
|
||||
[connection signal="pressed" from="margin_container/vbox/reset_bttn" to="." method="_on_reset_bttn_pressed"]
|
||||
[connection signal="pressed" from="margin_container/vbox/hbox2/hbox2/reset_bttn" to="." method="_on_reset_bttn_pressed"]
|
||||
|
||||
Reference in New Issue
Block a user