Initial Android commit
This commit is contained in:
commit
1e2b80c13d
8521 changed files with 231475 additions and 0 deletions
73
scripts/backround_scenes_scripts/Scene9.gd
Normal file
73
scripts/backround_scenes_scripts/Scene9.gd
Normal file
|
@ -0,0 +1,73 @@
|
|||
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("Time")) >= 45 or Dialogic.get_variable("TimelineSave") == "Timeline_10" or Dialogic.get_variable("TimelineSave") == "Timeline_10_1" or (Dialogic.get_variable("TimelineSave") == "Timeline_10_1" and Dialogic.get_variable("DialogIndex") != "0")):
|
||||
$Day / redblue.visible = false
|
||||
else :
|
||||
$Day / redblue.visible = true
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_character_listener")
|
||||
|
||||
get_tree().root.get_node("Root").StopSFX();
|
||||
|
||||
GallerySingleton.AddBackground("Scene9");
|
||||
else :
|
||||
$Day.visible = false;
|
||||
$Night.visible = true;
|
||||
if Dialogic.get_variable("LightsOn") == "1":
|
||||
$Night / Lights1_night.visible = true
|
||||
if Dialogic.get_variable("TimelineSave") != "Timeline_101":
|
||||
$Night / Lights2_night.visible = true
|
||||
$Night / Corpse.texture = load("res://resources/graphics/backgrounds/scene9/night/dead_body_contour_light.webp");
|
||||
else :
|
||||
$Night / Lights1_night.visible = false
|
||||
$Night / Lights2_night.visible = false
|
||||
|
||||
if Dialogic.get_variable("1_Death_Knife") != "none":
|
||||
$Night / Corpse.visible = true
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Rain Loop.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
GallerySingleton.AddBackground("Scene9_n");
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
if not GallerySingleton.HaveBackground("Scene9_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;
|
||||
|
||||
func _character_listener(string):
|
||||
match string:
|
||||
"remove_redblue":
|
||||
$Tween.interpolate_property($Day / redblue, "modulate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), 1.0, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
match string:
|
||||
"add_redblue":
|
||||
$Day / redblue.modulate = Color(1, 1, 1, 0)
|
||||
$Day / redblue.visible = true
|
||||
$Tween.interpolate_property($Day / redblue, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), 1.0, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
match string:
|
||||
"Camera1":
|
||||
$Tween2.remove_all()
|
||||
$Tween2.interpolate_property(self, "scale", self.scale, Vector2(1.1, 1.1), 10.0, Tween.TRANS_LINEAR, 0)
|
||||
$Tween2.start()
|
Loading…
Add table
Add a link
Reference in a new issue