started building out hub more
This commit is contained in:
20
scripts/environment_sky_switcher.gd
Normal file
20
scripts/environment_sky_switcher.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
extends Node3D
|
||||
class_name SkySwitcher
|
||||
|
||||
@export var skies : Array[Node] = []
|
||||
|
||||
var current_sky
|
||||
|
||||
func _ready() -> void:
|
||||
for i in skies:
|
||||
i.visible = false
|
||||
|
||||
|
||||
|
||||
func update_environment_sky(set_to_sky):
|
||||
if set_to_sky != current_sky:
|
||||
for i in skies:
|
||||
if i != set_to_sky:
|
||||
i.visible = false
|
||||
|
||||
skies[set_to_sky].visible = true
|
||||
Reference in New Issue
Block a user