Initial Android commit
This commit is contained in:
commit
1e2b80c13d
8521 changed files with 231475 additions and 0 deletions
41
scripts/Green__Black_Death_1.gd
Normal file
41
scripts/Green__Black_Death_1.gd
Normal file
|
@ -0,0 +1,41 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
if Dialogic.get_variable("1_Death_Knife") == "Black":
|
||||
GallerySingleton.AddImage("Black_Death_1");
|
||||
elif Dialogic.get_variable("1_Death_Knife") == "Green":
|
||||
GallerySingleton.AddImage("Green_Death_1");
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_lights_on_listener")
|
||||
|
||||
if Dialogic.get_variable("ItIsDay") == "false":
|
||||
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();
|
||||
|
||||
func _lights_on_listener(string):
|
||||
match string:
|
||||
"lights_on":
|
||||
TurnLightsOn()
|
||||
|
||||
func TurnLightsOn():
|
||||
$TurnOn.visible = true;
|
||||
$TurnOff.visible = false;
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.75, 0.75)
|
||||
|
||||
return ["ui_lights_on", "ui_lights_off"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_lights_on"):
|
||||
$TurnOn.visible = true;
|
||||
$TurnOff.visible = false;
|
||||
else :
|
||||
$TurnOn.visible = false;
|
||||
$TurnOff.visible = true;
|
Loading…
Add table
Add a link
Reference in a new issue