Initial Android commit
This commit is contained in:
commit
1e2b80c13d
8521 changed files with 231475 additions and 0 deletions
52
scripts/backround_scenes_scripts/Scene2.gd
Normal file
52
scripts/backround_scenes_scripts/Scene2.gd
Normal file
|
@ -0,0 +1,52 @@
|
|||
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;
|
||||
|
||||
if int(Dialogic.get_variable("RainDay")) == 1:
|
||||
$Day / rain.visible = true
|
||||
var sfxPath = "res://resources/audio/sfx/Rain Loop.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
else :
|
||||
get_tree().root.get_node("Root").StopSFX()
|
||||
|
||||
GallerySingleton.AddBackground("Scene2")
|
||||
else :
|
||||
$Day.visible = false;
|
||||
$Night.visible = true;
|
||||
if Dialogic.get_variable("LightsOn") != "1":
|
||||
$Night / night_house.texture = load("res://resources/graphics/backgrounds/scene2/2.0/ParadnayaNochLightOff.webp")
|
||||
$Night / Sprite6_n.visible = false
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Rain Loop.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
var player = get_tree().root.get_node("/root/BgmScene/TweenBGMsfx/BGMStreamPlayer")
|
||||
$Lightning.Init(4, player);
|
||||
|
||||
GallerySingleton.AddBackground("Scene2_n")
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
$Day.visible = true;
|
||||
|
||||
if not GallerySingleton.HaveBackground("Scene2_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;
|
Loading…
Add table
Add a link
Reference in a new issue