new coin model
This commit is contained in:
@@ -78,8 +78,12 @@ func end_enemy_turn():
|
||||
#set_player_turn()
|
||||
#end_turn()
|
||||
func end_turn():
|
||||
if !player1_revolver.can_be_loaded() and !player2_revolver.can_be_loaded():
|
||||
print("Phase 2")
|
||||
if !player1_revolver.can_be_loaded() and !player2_revolver.can_be_loaded() or !check_unloaded_bullets():
|
||||
var player = get_phase2_player_start()
|
||||
if player == 0:
|
||||
set_state(GameState.PLAYER1_UNLOAD)
|
||||
else:
|
||||
set_state(GameState.PLAYER2_UNLOAD)
|
||||
else:
|
||||
if last_turn == 0:
|
||||
set_enemy_turn()
|
||||
@@ -92,9 +96,9 @@ func get_enemy_revolver() -> Node3D:
|
||||
func get_phase2_player_start():
|
||||
var randNumb = randi_range(0,1)
|
||||
if randNumb == 0:
|
||||
set_state(GameState.PLAYER1_UNLOAD)
|
||||
return 0
|
||||
else:
|
||||
set_state(GameState.PLAYER2_UNLOAD)
|
||||
return 1
|
||||
|
||||
|
||||
func on_bullet_shoot(target):
|
||||
|
||||
Reference in New Issue
Block a user