more sound effects and polish
This commit is contained in:
@@ -36,6 +36,10 @@ class_name GameManager
|
||||
@export var dual_mask_probability: float = 0.2
|
||||
@export_tool_button("Create chara roster") var create_roster_action = create_new_roster
|
||||
|
||||
signal ring_bell_noise
|
||||
signal victory_noise
|
||||
signal defeat_noise
|
||||
|
||||
var current_chara_roster: Array[MaskedChara]
|
||||
|
||||
enum GameState {
|
||||
@@ -127,32 +131,40 @@ func ending_tween_cb():
|
||||
|
||||
print("Final score: %s" % final_score)
|
||||
|
||||
if final_score < 0:
|
||||
defeat_noise.emit()
|
||||
else:
|
||||
victory_noise.emit()
|
||||
|
||||
await get_tree().create_timer(5).timeout
|
||||
|
||||
var camera_tween = get_tree().create_tween()
|
||||
camera_tween.set_ease(Tween.EASE_IN_OUT)
|
||||
camera_tween.set_trans(Tween.TRANS_CUBIC)
|
||||
camera_tween.tween_property(camera_2d, "position", Vector2.ZERO, 1.0)
|
||||
|
||||
# Progress levels
|
||||
current_game_state = GameState.READY
|
||||
ring_bell.visible = true
|
||||
bell_anim_player.play("idle")
|
||||
if current_level == Levels.LVL1:
|
||||
|
||||
if current_level == Levels.LVL1 and final_score >= 0:
|
||||
current_level = Levels.LVL2
|
||||
elif current_level == Levels.LVL2:
|
||||
current_level = Levels.LVL3
|
||||
else:
|
||||
if final_score >= 0:
|
||||
roster_size += 1
|
||||
elif final_score >= 0:
|
||||
roster_size += 1
|
||||
current_level = Levels.RANDOM
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
character.visible = false
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_ready_bell_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void:
|
||||
if event is InputEventMouseButton and event.is_pressed():
|
||||
ring_bell_noise.emit()
|
||||
if current_game_state == GameState.READY:
|
||||
on_ready_bell_pressed()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user