Skip to content
Snippets Groups Projects
Commit 9f7f5e62 authored by BARBUTOV FILIP's avatar BARBUTOV FILIP
Browse files

sound settings effects on/off

parent 8723f894
Branches
Tags
1 merge request!6Figma team
......@@ -13,19 +13,51 @@ position = Vector2(960, 540)
texture = ExtResource("1_b84sh")
[node name="RichTextLabel" type="RichTextLabel" parent="."]
offset_left = 30.0
offset_top = 400.0
offset_right = 1890.0
offset_bottom = 960.0
offset_left = 44.0
offset_top = 392.0
offset_right = 1904.0
offset_bottom = 952.0
theme_override_font_sizes/normal_font_size = 33
text = "- Chaque joueur reçoit 13 cartes.
- Le joueur possédant le 3 de ♦ commence la partie.
- À son tour, un joueur peut poser une carte ou une combinaison supérieure à la précédente ou passer.
- Les joueurs peuvent passer leur tour, ce qui signifie qu'ils choisissent de ne pas jouer ou qu'ils n'ont pas les cartes pour jouer.
- Lorsque tous les joueurs sauf un ont passé successivement, le tour est terminé et les cartes jouées restent dans la défausse, un nouveau tour commence avec tous les joueurs, initié par le dernier joueur à jouer.
- Les combinaisons valides sont : carte simple, paire, brelan, suite de cinq cartes (comme au poker : suite, couleur, full, carré, quinte flush).
- La manche se termine lorsqu’un joueur n’a plus de cartes.
- Le jeu continue jusqu’à ce qu’un joueur atteigne un score défini (en fonction des cartes restantes des adversaires)."
text = "Big Two
🃏 Objective
Big Two is a strategic card game where the goal is to be the first to discard all your cards by playing stronger combinations than your opponents.
🃏 Card Distribution
Each player receives 13 cards from a standard 52-card deck without jokers.
🃏 Game Flow
• The player holding the 3♦ (Three of Diamonds) starts the game.
Players take turns in clockwise order.
On their turn, a player can:
• Play a stronger combination than the previous one.
• Pass if they cannot or do not wish to play.
• If all players pass, the last player to have played a combination starts a new round.
🃏 Number of Cards per Turn
• The first combination played determines the number of cards required for the round.
• Example: If a player plays a pair, the following players must play a stronger pair or pass.
🃏 Valid Combinations
• Single Card: (e.g., K♠)
• Pair: (e.g., 7♦ 7♣)
• Three-of-a-Kind: (e.g., 5♠ 5♦ 5♥)
• Straight: Five consecutive cards (e.g., 5♣ 6♦ 7♠ 8♥ 9♣)
• Flush: Five cards of the same suit (e.g., A♦ 8♦ 6♦ 5♦ 3♦)
• Full House: A three-of-a-kind + a pair (e.g., 10♣ 10♦ 10♥ 7♠ 7♣)
• Four-of-a-Kind: Four identical cards + one extra card (e.g., Q♣ Q♦ Q♥ Q♠ 5♦)
• Straight Flush: A straight where all cards share the same suit (e.g., 6♦ 7♦ 8♦ 9♦ 10♦)
🃏 End of the Game
• The game ends as soon as a player has played all their cards.
• That player is declared the winner!
🃏 Card Rankings
• Card Strength: 2♠ > A♠ > K♠ > Q♠ > J♠ > 10♠ > … > 3♠
• Suit Order: ♠ (Spades) > ♥ (Hearts) > ♣ (Clubs) > ♦ (Diamonds)
🃏 Tip: Use strategic combinations to trap your opponents and empty your hand faster than them! 🚀
"
[node name="Logo" type="Sprite2D" parent="."]
position = Vector2(960, 130)
......
[gd_scene load_steps=3 format=3 uid="uid://mipeblvp8t3q"]
[ext_resource type="Texture2D" uid="uid://cavhbnn0b3qoj" path="res://assets/ui/background.png" id="1_nu3s2"]
[sub_resource type="GDScript" id="GDScript_rlw7s"]
[node name="Background" type="Sprite2D"]
position = Vector2(968, 537)
texture = ExtResource("1_nu3s2")
script = SubResource("GDScript_rlw7s")
......@@ -23,3 +23,18 @@ func _on_h_slider_value_changed(value: float) -> void:
Config.volume_value = value # Modifie la valeur du volume dans le script autoload
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("BGMusic"), value)
print(value)
func _on_check_button_music_toggled(toggled_on: bool) -> void:
if toggled_on==false:
AudioServer.set_bus_mute(AudioServer.get_bus_index("BGMusic"),true)
else:
AudioServer.set_bus_mute(AudioServer.get_bus_index("BGMusic"),false)
func _on_check_button_button_sound_toggled(toggled_on: bool) -> void:
if toggled_on==false:
AudioServer.set_bus_mute(AudioServer.get_bus_index("Sfx"),true)
else:
AudioServer.set_bus_mute(AudioServer.get_bus_index("Sfx"),false)
......@@ -43,6 +43,7 @@ offset_top = 348.805
offset_right = 704.345
offset_bottom = 372.805
scale = Vector2(3, 3)
button_pressed = true
[node name="Title_button_sound" type="RichTextLabel" parent="PopupSettings"]
offset_left = 175.761
......@@ -116,6 +117,7 @@ offset_top = 481.95
offset_right = 706.331
offset_bottom = 505.95
scale = Vector2(3, 3)
button_pressed = true
[node name="Button" type="Button" parent="PopupSettings"]
offset_left = 592.821
......@@ -135,6 +137,8 @@ theme_override_font_sizes/font_size = 23
theme_override_styles/normal = SubResource("StyleBoxFlat_ni351")
text = "Exit to main menu"
[connection signal="toggled" from="PopupSettings/CheckButton_music" to="." method="_on_check_button_music_toggled"]
[connection signal="value_changed" from="PopupSettings/HSlider" to="." method="_on_h_slider_value_changed"]
[connection signal="toggled" from="PopupSettings/CheckButton_button_sound" to="." method="_on_check_button_button_sound_toggled"]
[connection signal="pressed" from="PopupSettings/Button" to="." method="_on_button_pressed"]
[connection signal="pressed" from="PopupSettings/Button2" to="." method="_on_button_2_pressed"]
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment