last minute tuto changes
This commit is contained in:
@@ -126,12 +126,14 @@ func compute_ending():
|
||||
|
||||
func ending_tween_cb():
|
||||
var final_score = 0.0
|
||||
for table in tables:
|
||||
final_score += table.compute_score()
|
||||
var table1_score = tables[0].compute_score()
|
||||
var table2_score = tables[1].compute_score()
|
||||
var table3_score = tables[2].compute_score()
|
||||
final_score = table1_score + table2_score + table3_score
|
||||
|
||||
print("Final score: %s" % final_score)
|
||||
|
||||
if final_score < 0:
|
||||
var is_defeat = table1_score < 0 or table2_score < 0 or table3_score < 0
|
||||
if is_defeat:
|
||||
defeat_noise.emit()
|
||||
else:
|
||||
victory_noise.emit()
|
||||
@@ -147,12 +149,15 @@ func ending_tween_cb():
|
||||
current_game_state = GameState.READY
|
||||
ring_bell.visible = true
|
||||
bell_anim_player.play("idle")
|
||||
|
||||
if is_defeat:
|
||||
return
|
||||
|
||||
if current_level == Levels.LVL1 and final_score >= 0:
|
||||
if current_level == Levels.LVL1:
|
||||
current_level = Levels.LVL2
|
||||
elif current_level == Levels.LVL2:
|
||||
current_level = Levels.LVL3
|
||||
elif final_score >= 0:
|
||||
else:
|
||||
roster_size += 1
|
||||
current_level = Levels.RANDOM
|
||||
|
||||
|
||||
Reference in New Issue
Block a user