Initial commit
This commit is contained in:
28
scenes/misc/MusicTrack.tscn
Normal file
28
scenes/misc/MusicTrack.tscn
Normal file
@@ -0,0 +1,28 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="GDScript" id=1]
|
||||
script/source = "extends Node
|
||||
|
||||
\"\"\"
|
||||
Add this to any level and it'll start playing the indicated song
|
||||
as soon as the level loads
|
||||
\"\"\"
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = \"text\"
|
||||
@export var music_track = \"\" # (String, FILE, \"*.ogg\")
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
if music_track != \"\":
|
||||
Music.play(music_track)
|
||||
pass # Replace with function body.
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
"
|
||||
|
||||
[node name="music_track" type="Node"]
|
||||
script = SubResource( 1 )
|
||||
Reference in New Issue
Block a user