Initial Android commit
This commit is contained in:
commit
1e2b80c13d
8521 changed files with 231475 additions and 0 deletions
59
scripts/backround_scenes_scripts/Mayak.gd
Normal file
59
scripts/backround_scenes_scripts/Mayak.gd
Normal file
|
@ -0,0 +1,59 @@
|
|||
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:
|
||||
var sfxPath = "res://resources/audio/sfx/Mayak_dayrain.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
$day / rain.visible = true
|
||||
else :
|
||||
var sfxPath = "res://resources/audio/sfx/Mayak_day.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
$day / rain.visible = false
|
||||
|
||||
GallerySingleton.AddBackground("Mayak")
|
||||
else :
|
||||
$day.visible = false
|
||||
$night.visible = true
|
||||
|
||||
var sfxPath = "";
|
||||
var value = Dialogic.get_variable("TimelineSave");
|
||||
if value == "Timeline_120_front" or value == "Timeline_before_141" or value == "Timeline_120_lighthouse_back" or value == "timeline_140_lighthouse_back":
|
||||
sfxPath = "res://resources/audio/sfx/Rain Loop.ogg"
|
||||
else :
|
||||
sfxPath = "res://resources/audio/sfx/Mayak_night.ogg"
|
||||
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
var player = get_tree().root.get_node("/root/BgmScene/TweenBGMsfx/BGMStreamPlayer");
|
||||
$night / Lightning.Init(4, player);
|
||||
|
||||
GallerySingleton.AddBackground("Mayak_n")
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
$day.visible = true
|
||||
$day / rain.visible = false;
|
||||
$night.visible = false;
|
||||
|
||||
if not GallerySingleton.HaveBackground("Mayak_n"):
|
||||
return [];
|
||||
|
||||
return ["ui_day", "ui_night"]
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_day"):
|
||||
$day.visible = true
|
||||
$day / rain.visible = false;
|
||||
$night.visible = false;
|
||||
else :
|
||||
$day.visible = false
|
||||
$day / rain.visible = false;
|
||||
$night.visible = true;
|
||||
$night / rain.visible = true;
|
Loading…
Add table
Add a link
Reference in a new issue