Workers, lighting, and loading
This commit is contained in:
19
client/Scripts/Entities/Zone.gd
Normal file
19
client/Scripts/Entities/Zone.gd
Normal file
@ -0,0 +1,19 @@
|
||||
extends Node2D
|
||||
|
||||
export var load_on_start = false
|
||||
export var music : AudioStream
|
||||
|
||||
func _ready():
|
||||
if load_on_start:
|
||||
load_zone()
|
||||
else:
|
||||
unload_zone()
|
||||
|
||||
func load_zone():
|
||||
if $"/root/MusicManager".stream != music:
|
||||
$"/root/MusicManager".play_stream(music)
|
||||
show()
|
||||
|
||||
func unload_zone():
|
||||
hide()
|
||||
|
Reference in New Issue
Block a user