46 lines
990 B
GDScript
46 lines
990 B
GDScript
extends Node2D
|
|
|
|
func _ready():
|
|
if not get_tree().root.has_node("Root"):
|
|
return ;
|
|
|
|
if Dialogic.get_variable("ItIsDay") == "true":
|
|
$Day.visible = true;
|
|
$Night.visible = false;
|
|
|
|
call_deferred("InitCat");
|
|
|
|
get_tree().root.get_node("Root").StopSFX();
|
|
|
|
GallerySingleton.AddBackground("Scene6")
|
|
else :
|
|
$Day.visible = false;
|
|
$Night.visible = true;
|
|
|
|
var sfxPath = "res://resources/audio/sfx/Rain Loop.ogg"
|
|
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
|
|
|
GallerySingleton.AddBackground("Scene6_n")
|
|
|
|
func InitCat():
|
|
$Cat.Init(999, 7);
|
|
$Cat.position = Vector2(195, 595);
|
|
$Cat.Scale(0.55)
|
|
$Cat.visible = true;
|
|
|
|
func InitForGallery()->Array:
|
|
$Cat.visible = false;
|
|
scale = Vector2(0.5, 0.5)
|
|
|
|
if not GallerySingleton.HaveBackground("Scene6_n"):
|
|
return [];
|
|
|
|
return ["ui_day", "ui_night"]
|
|
|
|
func SetSettings(setting):
|
|
if setting == tr("ui_day"):
|
|
$Day.visible = true;
|
|
$Night.visible = false;
|
|
else :
|
|
$Day.visible = false;
|
|
$Night.visible = true;
|