v.0.5.7.1 instant loose

main
Daniel Lehmann 2024-03-30 18:55:34 +01:00
parent 775f4c17a8
commit cf02a54230
1 changed files with 13 additions and 0 deletions

13
game.gd
View File

@ -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"):