v.0.5.7.1 instant loose
parent
775f4c17a8
commit
cf02a54230
13
game.gd
13
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"):
|
||||
|
|
Loading…
Reference in New Issue