From cf02a54230989a24f842c2283e3199c31bc7fded Mon Sep 17 00:00:00 2001 From: Daniel Lehmann <3004405@stud.hs-mannheim.de> Date: Sat, 30 Mar 2024 18:55:34 +0100 Subject: [PATCH] v.0.5.7.1 instant loose --- game.gd | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/game.gd b/game.gd index 0f61f6f..bcf8516 100644 --- a/game.gd +++ b/game.gd @@ -168,9 +168,19 @@ func _instant_win(): wonPlayer.show() nextPlayer.hide() board.active = false + +func _instant_loose(): + current_player = 1 - current_player + won = player_states[current_player] + print("Winner: ", won) + wonPlayer.region_rect.position.x = player_states.find(won) * 300 + wonPlayer.show() + nextPlayer.hide() + board.active = false #Zum Testen der Events func _on_test_pressed(): + _instant_loose() ereignis.text += "test" @@ -179,6 +189,9 @@ func _spin_the_wheel(result: int) -> void: if result <= 3: ereignis.text += "Instant win!" _instant_win() + elif result <= 6: + ereignis.text += "Instant loose!" + _instant_loose() elif result <= 15: ereignis.text += "Du darfst einen Stein entfernen!" if Input.is_action_just_pressed("Click"):