Added Grant Blevins
This commit is contained in:
11
client/Scripts/Entities/MusicZone.gd
Normal file
11
client/Scripts/Entities/MusicZone.gd
Normal file
@ -0,0 +1,11 @@
|
||||
extends Area2D
|
||||
|
||||
export var music : AudioStream
|
||||
|
||||
func _ready():
|
||||
connect("body_entered", self, "_on_body_entered")
|
||||
|
||||
func _on_body_entered(body):
|
||||
if body.has_method("user_input"):
|
||||
if $"/root/MusicManager".stream != music:
|
||||
$"/root/MusicManager".play_stream(music)
|
Reference in New Issue
Block a user