mirror of
https://github.com/clarkjohn/wizard-chase.git
synced 2026-01-23 02:14:32 +00:00
Add initial code
This commit is contained in:
parent
a27c863d6b
commit
1135a36a9e
257 changed files with 12234 additions and 1 deletions
14
audio/GameStartMusicTween.gd
Normal file
14
audio/GameStartMusicTween.gd
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class_name GameStartMusicTween
|
||||
extends Tween
|
||||
|
||||
# https://godotengine.org/qa/27939/how-to-fade-in-out-an-audio-stream
|
||||
|
||||
func fade_music_out(stream_player: AudioStreamPlayer):
|
||||
# tween music volume down to 0
|
||||
self.interpolate_property(stream_player, "volume_db", stream_player.volume_db, -80, 4, 1, Tween.EASE_IN, 0)
|
||||
self.start()
|
||||
|
||||
|
||||
func _on_GameStartMusicTween_tween_completed(object, key):
|
||||
# stop the music -- otherwise it continues to run at silent volume
|
||||
object.stop()
|
||||
Loading…
Add table
Add a link
Reference in a new issue