Initial Android commit
This commit is contained in:
commit
1e2b80c13d
8521 changed files with 231475 additions and 0 deletions
47
scripts/backround_scenes_scripts/Tretii_etaj.gd
Normal file
47
scripts/backround_scenes_scripts/Tretii_etaj.gd
Normal file
|
@ -0,0 +1,47 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddBackground("Tretii_etaj")
|
||||
|
||||
$Cat.Init(2, 9);
|
||||
$Cat.position = Vector2(510, 650);
|
||||
$Cat.Scale(0.4);
|
||||
|
||||
if int(Dialogic.get_variable("LightsOn")) == 1:
|
||||
$lights_on.visible = true
|
||||
$lights_off.visible = false
|
||||
else :
|
||||
$lights_on.visible = false
|
||||
$lights_off.visible = true
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_lights_listener")
|
||||
|
||||
func _lights_listener(string):
|
||||
match string:
|
||||
"lights_on":
|
||||
Dialogic.set_variable("LightsOn", 1)
|
||||
$lights_on.visible = true
|
||||
$lights_off.visible = false
|
||||
"lights_off":
|
||||
Dialogic.set_variable("LightsOn", 0)
|
||||
$lights_on.visible = false
|
||||
$lights_off.visible = true
|
||||
|
||||
func InitForGallery()->Array:
|
||||
$Cat.visible = false;
|
||||
scale = Vector2(0.5, 0.5)
|
||||
$lights_off.visible = false;
|
||||
|
||||
return ["ui_lights_on", "ui_lights_off"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_lights_on"):
|
||||
$lights_on.visible = true;
|
||||
$lights_off.visible = false;
|
||||
else :
|
||||
$lights_on.visible = false;
|
||||
$lights_off.visible = true;
|
Loading…
Add table
Add a link
Reference in a new issue