generated from tecMTST/modelo-godot-3.6
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83d296a
commit 68c56fd
Showing
4 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
extends AudioStreamPlayer | ||
|
||
onready var sons = { | ||
"agua": preload ("res://elementos/som/movimento_agua.wav"), | ||
"dano": preload ("res://elementos/som/bolha_2.wav") | ||
} | ||
|
||
func _on_ControleFaixa3D_iniciou_movimento(_direcao, _alvo) -> void: | ||
stop() | ||
stream = sons.agua | ||
play() | ||
|
||
|
||
func _on_ControleFaixa3D_terminou_movimento() -> void: | ||
yield(get_tree().create_timer(1.0), "timeout") | ||
stop() | ||
|
||
func _on_Vida_vida_alterada(alteracao: Vida.VidaAlterada) -> void: | ||
if !alteracao.cura: | ||
stop() | ||
stream = sons.dano | ||
play() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters