Initial Android commit
This commit is contained in:
commit
1e2b80c13d
8521 changed files with 231475 additions and 0 deletions
48
scripts/backround_scenes_scripts/Agatha_sex.gd
Normal file
48
scripts/backround_scenes_scripts/Agatha_sex.gd
Normal file
|
@ -0,0 +1,48 @@
|
|||
extends Node2D
|
||||
|
||||
const fadeTime = 1.7
|
||||
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Agatha_sex");
|
||||
|
||||
if Dialogic.get_variable("SexSpriteNumber") == "2":
|
||||
$Sprite1.visible = false
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_slideswitch_listener")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func _slideswitch_listener(string):
|
||||
match string:
|
||||
"sprite2":
|
||||
Dialogic.set_variable("SexSpriteNumber", 2)
|
||||
var tween = $"Tween"
|
||||
tween.interpolate_method(self, "Sprite1Interpolate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
tween.start()
|
||||
|
||||
func Sprite1Interpolate(value):
|
||||
$Sprite1.self_modulate.a = value
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
return ["ui_gallery_fall_1", "ui_gallery_fall_2"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_gallery_fall_1"):
|
||||
$Sprite1.visible = true;
|
||||
$Sprite2.visible = false;
|
||||
elif setting == tr("ui_gallery_fall_2"):
|
||||
$Sprite1.visible = false;
|
||||
$Sprite2.visible = true;
|
59
scripts/backround_scenes_scripts/Amanda_Suicide.gd
Normal file
59
scripts/backround_scenes_scripts/Amanda_Suicide.gd
Normal file
|
@ -0,0 +1,59 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Amanda_Suicide");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var videoPlayer = $Video / VideoPlayer
|
||||
var path = ""
|
||||
if int(Dialogic.get_variable("Is_White_Dead")) == 1:
|
||||
path = "res://resources/video/роз_глок_новый.ogv"
|
||||
else :
|
||||
path = "res://resources/video/роз_беретта_новый.ogv"
|
||||
videoPlayer.stream = load(path)
|
||||
videoPlayer.play()
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
$Video.scale = Vector2(0.5, 0.5)
|
||||
|
||||
var glock = GallerySingleton.HaveImage("Amanda_Suicide_glock");
|
||||
var beretta = GallerySingleton.HaveImage("Amanda_Suicide_beretta");
|
||||
|
||||
var videoPlayer = $Video / VideoPlayer
|
||||
var path = ""
|
||||
if glock and beretta:
|
||||
path = "res://resources/video/роз_глок_новый.ogv"
|
||||
videoPlayer.stream = load(path)
|
||||
videoPlayer.play()
|
||||
return ["ui_gallery_fall_1", "ui_gallery_fall_2"]
|
||||
elif glock and not beretta:
|
||||
path = "res://resources/video/роз_глок_новый.ogv"
|
||||
else :
|
||||
path = "res://resources/video/роз_беретта_новый.ogv"
|
||||
|
||||
videoPlayer.stream = load(path)
|
||||
videoPlayer.play()
|
||||
return [];
|
||||
|
||||
|
||||
func SetSettings(setting):
|
||||
var videoPlayer = $Video / VideoPlayer
|
||||
var path = ""
|
||||
|
||||
if setting == tr("ui_gallery_fall_1"):
|
||||
path = "res://resources/video/роз_глок_новый.ogv"
|
||||
elif setting == tr("ui_gallery_fall_2"):
|
||||
path = "res://resources/video/роз_беретта_новый.ogv"
|
||||
|
||||
videoPlayer.stream = load(path)
|
||||
videoPlayer.play()
|
75
scripts/backround_scenes_scripts/Amanda_before_sex.gd
Normal file
75
scripts/backround_scenes_scripts/Amanda_before_sex.gd
Normal file
|
@ -0,0 +1,75 @@
|
|||
extends Node2D
|
||||
|
||||
|
||||
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Amanda_before_sex");
|
||||
|
||||
if Dialogic.get_variable("SexSpriteNumber") != "1":
|
||||
var headNum = int(Dialogic.get_variable("SexSpriteNumber"))
|
||||
ChangeHead(headNum)
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_slideswitch_listener")
|
||||
|
||||
func _slideswitch_listener(string):
|
||||
match string:
|
||||
"sprite2":
|
||||
Dialogic.set_variable("SexSpriteNumber", 2)
|
||||
ChangeHead(2)
|
||||
"sprite3":
|
||||
Dialogic.set_variable("SexSpriteNumber", 3)
|
||||
ChangeHead(3)
|
||||
"sprite4":
|
||||
Dialogic.set_variable("SexSpriteNumber", 4)
|
||||
ChangeHead(4)
|
||||
|
||||
func ChangeHead(headNum:int):
|
||||
match headNum:
|
||||
2:
|
||||
$Head1.visible = false
|
||||
$Head2.visible = true
|
||||
$Head3.visible = false
|
||||
$Head4.visible = false
|
||||
3:
|
||||
$Head1.visible = false
|
||||
$Head2.visible = false
|
||||
$Head3.visible = true
|
||||
$Head4.visible = false
|
||||
4:
|
||||
$Head1.visible = false
|
||||
$Head2.visible = false
|
||||
$Head3.visible = false
|
||||
$Head4.visible = true
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
return ["ui_gallery_fall_1", "ui_gallery_fall_2", "ui_gallery_fall_3", "ui_gallery_fall_4"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_gallery_fall_1"):
|
||||
$Head1.visible = true;
|
||||
$Head2.visible = false;
|
||||
$Head3.visible = false;
|
||||
$Head4.visible = false;
|
||||
elif setting == tr("ui_gallery_fall_2"):
|
||||
$Head1.visible = false;
|
||||
$Head2.visible = true;
|
||||
$Head3.visible = false;
|
||||
$Head4.visible = false;
|
||||
elif setting == tr("ui_gallery_fall_3"):
|
||||
$Head1.visible = false;
|
||||
$Head2.visible = false;
|
||||
$Head3.visible = true;
|
||||
$Head4.visible = false;
|
||||
elif setting == tr("ui_gallery_fall_4"):
|
||||
$Head1.visible = false;
|
||||
$Head2.visible = false;
|
||||
$Head3.visible = false;
|
||||
$Head4.visible = true;
|
46
scripts/backround_scenes_scripts/Amanda_sex.gd
Normal file
46
scripts/backround_scenes_scripts/Amanda_sex.gd
Normal file
|
@ -0,0 +1,46 @@
|
|||
extends Node2D
|
||||
|
||||
const fadeTime = 1.4
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Amanda_sex");
|
||||
|
||||
if Dialogic.get_variable("SexSpriteNumber") == "2":
|
||||
$Sprite1.visible = false
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_slideswitch_listener")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func _slideswitch_listener(string):
|
||||
match string:
|
||||
"sprite2":
|
||||
Dialogic.set_variable("SexSpriteNumber", 2)
|
||||
var tween = $"Tween"
|
||||
tween.interpolate_method(self, "Sprite1Interpolate", 1, 0, fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
tween.start()
|
||||
|
||||
func Sprite1Interpolate(value):
|
||||
$Sprite1.self_modulate.a = value
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
return ["ui_gallery_fall_1", "ui_gallery_fall_2"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_gallery_fall_1"):
|
||||
$Sprite1.visible = true;
|
||||
$Sprite2.visible = false;
|
||||
elif setting == tr("ui_gallery_fall_2"):
|
||||
$Sprite1.visible = false;
|
||||
$Sprite2.visible = true;
|
59
scripts/backround_scenes_scripts/Car.gd
Normal file
59
scripts/backround_scenes_scripts/Car.gd
Normal file
|
@ -0,0 +1,59 @@
|
|||
extends Node2D
|
||||
|
||||
const fadingTime = 0.8
|
||||
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_crash_listener")
|
||||
|
||||
GallerySingleton.AddImage("Car");
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/12_1_ezdy na maschiny idet dojd.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func _crash_listener(string):
|
||||
match string:
|
||||
"crash":
|
||||
|
||||
$CrashBack.modulate = Color(1, 1, 1, 0)
|
||||
$Car2.modulate = Color(1, 1, 1, 0)
|
||||
$CrashBack.visible = true
|
||||
$Car2.visible = true
|
||||
$Tween.interpolate_property($View3d, "modulate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), fadingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property($Car1, "modulate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), fadingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property($Car2, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), fadingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property($CrashBack, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), fadingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
|
||||
|
||||
func _on_Tween_tween_all_completed():
|
||||
$View3D.visible = false
|
||||
$Car1.visible = false
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
return ["ui_gallery_car_crash"];
|
||||
|
||||
func SetToggleSettings(button):
|
||||
var state = button.pressed;
|
||||
if state:
|
||||
$View3D.visible = false;
|
||||
$Car1.visible = false;
|
||||
$CrashBack.visible = true;
|
||||
$Car2.visible = true;
|
||||
else :
|
||||
$View3D.visible = true;
|
||||
$Car1.visible = true;
|
||||
$CrashBack.visible = false;
|
||||
$Car2.visible = false;
|
19
scripts/backround_scenes_scripts/CarBack3d.gd
Normal file
19
scripts/backround_scenes_scripts/CarBack3d.gd
Normal file
|
@ -0,0 +1,19 @@
|
|||
extends Spatial
|
||||
|
||||
var treeInitialPos = []
|
||||
const carSpeed = 30.0
|
||||
|
||||
|
||||
func _ready():
|
||||
InitTreeStartPosition()
|
||||
|
||||
|
||||
func InitTreeStartPosition():
|
||||
for i in $TreeArray.get_child_count():
|
||||
treeInitialPos.push_back($TreeArray.get_child(i).translation.z)
|
||||
|
||||
func _process(delta):
|
||||
for i in $TreeArray.get_child_count():
|
||||
$TreeArray.get_child(i).translation.z -= carSpeed * delta
|
||||
if $TreeArray.get_child(i).translation.z <= - 1.0:
|
||||
$TreeArray.get_child(i).translation.z = treeInitialPos[i]
|
191
scripts/backround_scenes_scripts/ChapterSelector.gd
Normal file
191
scripts/backround_scenes_scripts/ChapterSelector.gd
Normal file
|
@ -0,0 +1,191 @@
|
|||
extends Node2D
|
||||
|
||||
var difficulty:String
|
||||
var isChapterZooming
|
||||
var chapter:String
|
||||
onready var zoomTime = 3.2
|
||||
var endPosition:String
|
||||
|
||||
|
||||
|
||||
func _ready():
|
||||
get_node("/root/BgmScene").StopMenuMusic()
|
||||
get_node("/root/BgmScene").SetBGM("City SFX")
|
||||
GallerySingleton.AddMusic("BigCity");
|
||||
|
||||
GallerySingleton.AddBackground("ChapterSelector");
|
||||
|
||||
Localization();
|
||||
|
||||
if not SceneLoader.is_connected("on_scene_loaded", self, "OpenAnotherScene"):
|
||||
var _temp = SceneLoader.connect("on_scene_loaded", self, "OpenAnotherScene")
|
||||
|
||||
isChapterZooming = true;
|
||||
SetCamera("full")
|
||||
yield ($Camera2D / Tween, "tween_all_completed")
|
||||
|
||||
isChapterZooming = false;
|
||||
|
||||
func Localization():
|
||||
$text / Journey.text = tr("ui_adventure")
|
||||
$text / buttons / Yes.text = tr("ui_yes");
|
||||
$text / buttons / No.text = tr("ui_no");
|
||||
|
||||
|
||||
$ChapterLabels / SelectChapter.text = tr("ui_select_chapter").to_upper();
|
||||
$ChapterLabels / chapter1.text = str(tr("ui_chapter"), " 1");
|
||||
|
||||
func SetCamera(camPos:String):
|
||||
var finalPos = Vector2(960, 540);
|
||||
var finalZoom = Vector2(1, 1);
|
||||
endPosition = camPos
|
||||
match camPos:
|
||||
"full":
|
||||
pass
|
||||
"brown":
|
||||
finalPos = Vector2(1726, 461);
|
||||
finalZoom = Vector2(0.2, 0.2);
|
||||
"green":
|
||||
finalPos = Vector2(1102, 590);
|
||||
finalZoom = Vector2(0.2, 0.2);
|
||||
var camera = $Camera2D
|
||||
|
||||
var startPos = camera.position
|
||||
var startZoom = camera.zoom
|
||||
|
||||
$Camera2D.position = startPos;
|
||||
$Camera2D.zoom = startZoom;
|
||||
|
||||
$Camera2D / Tween.interpolate_method(self, "ChangePosition", startPos, finalPos, zoomTime, Tween.TRANS_LINEAR, 0);
|
||||
$Camera2D / Tween.interpolate_method(self, "ChangeZoom", startZoom, finalZoom, zoomTime, Tween.TRANS_LINEAR, 0);
|
||||
|
||||
$Camera2D / Tween.start();
|
||||
|
||||
|
||||
func SetCameraToFinalPos(camPos:String):
|
||||
var finalPos = Vector2(960, 540);
|
||||
var finalZoom = Vector2(1, 1);
|
||||
match camPos:
|
||||
"full":
|
||||
pass
|
||||
"brown":
|
||||
finalPos = Vector2(1726, 461);
|
||||
finalZoom = Vector2(0.2, 0.2);
|
||||
"green":
|
||||
finalPos = Vector2(1102, 590);
|
||||
finalZoom = Vector2(0.2, 0.2);
|
||||
$Camera2D.position = finalPos;
|
||||
$Camera2D.zoom = finalZoom;
|
||||
|
||||
func ChangePosition(newPosition):
|
||||
$Camera2D.position = newPosition
|
||||
|
||||
func ChangeZoom(newZoom):
|
||||
$Camera2D.zoom = newZoom
|
||||
|
||||
|
||||
|
||||
func _on_brown_pressed():
|
||||
isChapterZooming = true
|
||||
$text.rect_position = Vector2(1534.5, 400)
|
||||
$text.rect_scale = Vector2(0.25, 0.25)
|
||||
chapter = "Brown"
|
||||
SetCamera("brown")
|
||||
yield ($Camera2D / Tween, "tween_all_completed")
|
||||
$ChapterLabels.visible = false;
|
||||
isChapterZooming = false
|
||||
$text.visible = true
|
||||
|
||||
func _on_green_pressed():
|
||||
isChapterZooming = true
|
||||
$text.rect_position = Vector2(910.5, 529)
|
||||
$text.rect_scale = Vector2(0.25, 0.25)
|
||||
chapter = "Green"
|
||||
SetCamera("green")
|
||||
yield ($Camera2D / Tween, "tween_all_completed")
|
||||
$ChapterLabels.visible = false;
|
||||
isChapterZooming = false
|
||||
$text.visible = true
|
||||
|
||||
func _on_Yes_pressed():
|
||||
$text / buttons.visible = false;
|
||||
get_tree().root.get_node("Loading").ShowLoader();
|
||||
SceneLoader.free_scene_cache("Game");
|
||||
LoadScene("res://scenes/Game.tscn");
|
||||
|
||||
|
||||
func _on_No_pressed():
|
||||
$text.visible = false
|
||||
$ChapterLabels.visible = true;
|
||||
isChapterZooming = true
|
||||
SetCamera("full")
|
||||
yield ($Camera2D / Tween, "tween_all_completed")
|
||||
isChapterZooming = false
|
||||
|
||||
func MenuLoaded(obj):
|
||||
if obj.path != "res://scenes/MainMenu.tscn":
|
||||
return ;
|
||||
|
||||
if obj.instance != null:
|
||||
get_tree().root.add_child(obj.instance);
|
||||
|
||||
for i in get_tree().root.get_children():
|
||||
if i.name == "ChapterSelector":
|
||||
get_tree().root.remove_child(i);
|
||||
break;
|
||||
|
||||
SceneLoader.disconnect("on_scene_loaded", self, "MenuLoaded");
|
||||
|
||||
func _input(ev):
|
||||
if ev is InputEventKey and ev.scancode == KEY_ESCAPE and not ev.pressed:
|
||||
if isChapterZooming:
|
||||
$Camera2D / Tween.remove_all();
|
||||
SetCameraToFinalPos(endPosition);
|
||||
$Camera2D / Tween.emit_signal("tween_all_completed")
|
||||
elif $Camera2D.position == Vector2(960, 540):
|
||||
get_node("/root/BgmScene").SetBGM("99");
|
||||
get_tree().root.get_node("BgmScene").StartMenuMusic();
|
||||
if not SceneLoader.is_connected("on_scene_loaded", self, "MenuLoaded"):
|
||||
var _temp = SceneLoader.connect("on_scene_loaded", self, "MenuLoaded");
|
||||
SceneLoader.load_scene("res://scenes/MainMenu.tscn")
|
||||
if ev is InputEventKey and ev.scancode == KEY_SPACE:
|
||||
if isChapterZooming:
|
||||
$Camera2D / Tween.remove_all();
|
||||
SetCameraToFinalPos(endPosition)
|
||||
$Camera2D / Tween.emit_signal("tween_all_completed")
|
||||
if ev is InputEventMouseButton and ev.button_index == BUTTON_LEFT and not ev.pressed:
|
||||
if isChapterZooming:
|
||||
$Camera2D / Tween.remove_all();
|
||||
SetCameraToFinalPos(endPosition)
|
||||
$Camera2D / Tween.emit_signal("tween_all_completed")
|
||||
|
||||
var loadingPath:String = "";
|
||||
func LoadScene(path):
|
||||
SceneLoader.load_scene(path);
|
||||
loadingPath = path;
|
||||
|
||||
func OpenAnotherScene(obj):
|
||||
if obj.path == loadingPath:
|
||||
get_tree().root.add_child(obj.instance);
|
||||
CloseMenu();
|
||||
|
||||
func CloseMenu():
|
||||
for i in get_tree().root.get_children():
|
||||
if i.name == "ChapterSelector":
|
||||
get_tree().root.remove_child(i);
|
||||
break;
|
||||
|
||||
SceneLoader.disconnect("on_scene_loaded", self, "OpenAnotherScene");
|
||||
|
||||
func InitForGallery()->Array:
|
||||
$Camera2D.current = false
|
||||
|
||||
|
||||
scale = Vector2(0.5, 0.5);
|
||||
$ChapterLabels.visible = false;
|
||||
$brown.visible = false;
|
||||
return [];
|
||||
|
||||
|
||||
func _on_chapter1_pressed():
|
||||
_on_brown_pressed()
|
|
@ -0,0 +1,4 @@
|
|||
extends Node2D
|
||||
|
||||
func InitForGallery()->Array:
|
||||
return [];
|
6
scripts/backround_scenes_scripts/Chernii_ekran.gd
Normal file
6
scripts/backround_scenes_scripts/Chernii_ekran.gd
Normal file
|
@ -0,0 +1,6 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
var sfxPath = "res://resources/audio/sfx/FireDead.ogg"
|
||||
if Dialogic.get_variable("HospitalSFX") == "2":
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
264
scripts/backround_scenes_scripts/Comics.gd
Normal file
264
scripts/backround_scenes_scripts/Comics.gd
Normal file
|
@ -0,0 +1,264 @@
|
|||
extends Node2D
|
||||
|
||||
var timerNeed = false
|
||||
|
||||
const camPos = [
|
||||
Vector2(280, 0),
|
||||
Vector2( - 900, 0),
|
||||
Vector2( - 1280, - 400),
|
||||
Vector2( - 2100, 0),
|
||||
Vector2(280, - 790),
|
||||
Vector2( - 775, - 570),
|
||||
Vector2( - 2100, - 790),
|
||||
Vector2(0, - 1100),
|
||||
Vector2(0, 0)
|
||||
]
|
||||
const camZoom = [
|
||||
Vector2(2, 2),
|
||||
Vector2(2, 2),
|
||||
Vector2(2.5, 2.5),
|
||||
Vector2(2, 2),
|
||||
Vector2(2, 2),
|
||||
Vector2(1.8, 1.8),
|
||||
Vector2(2, 2),
|
||||
Vector2(1.5, 1.5),
|
||||
Vector2(1, 1)
|
||||
]
|
||||
|
||||
const camSpecialTime = 8.0
|
||||
const camSpecialPosition = Vector2( - 1100, - 1100)
|
||||
const camTime = [
|
||||
2.0,
|
||||
2.5,
|
||||
1.0,
|
||||
2.5,
|
||||
2.0,
|
||||
2.0,
|
||||
2.5,
|
||||
2.0,
|
||||
2.0
|
||||
]
|
||||
|
||||
const fadeTime = 1.0
|
||||
|
||||
|
||||
func _ready():
|
||||
var viewPosition = int(Dialogic.get_variable("cameraPosition"))
|
||||
self.position = camPos[viewPosition]
|
||||
self.scale = camZoom[viewPosition]
|
||||
match viewPosition:
|
||||
0:
|
||||
pass
|
||||
1:
|
||||
$Sprite1.visible = true
|
||||
self.position = camPos[0]
|
||||
self.scale = camZoom[0]
|
||||
2:
|
||||
$Sprite1.visible = true
|
||||
$Sprite2.visible = true
|
||||
self.position = camPos[1]
|
||||
self.scale = camZoom[1]
|
||||
3:
|
||||
$Sprite1.visible = true
|
||||
$Sprite2.visible = true
|
||||
$Sprite3.visible = true
|
||||
self.position = camPos[2]
|
||||
self.scale = camZoom[2]
|
||||
4:
|
||||
$Sprite1.visible = true
|
||||
$Sprite2.visible = true
|
||||
$Sprite3.visible = true
|
||||
$Sprite4.visible = true
|
||||
self.position = camPos[3]
|
||||
self.scale = camZoom[3]
|
||||
5:
|
||||
$Sprite1.visible = true
|
||||
$Sprite2.visible = true
|
||||
$Sprite3.visible = true
|
||||
$Sprite4.visible = true
|
||||
$Sprite5.visible = true
|
||||
self.position = camPos[4]
|
||||
self.scale = camZoom[4]
|
||||
6:
|
||||
$Sprite1.visible = true
|
||||
$Sprite2.visible = true
|
||||
$Sprite3.visible = true
|
||||
$Sprite4.visible = true
|
||||
$Sprite5.visible = true
|
||||
$Sprite6.visible = true
|
||||
self.position = camPos[5]
|
||||
self.scale = camZoom[5]
|
||||
7:
|
||||
$Sprite1.visible = true
|
||||
$Sprite2.visible = true
|
||||
$Sprite3.visible = true
|
||||
$Sprite4.visible = true
|
||||
$Sprite5.visible = true
|
||||
$Sprite6.visible = true
|
||||
$Sprite7.visible = true
|
||||
self.position = camPos[6]
|
||||
self.scale = camZoom[6]
|
||||
8:
|
||||
$Sprite1.visible = true
|
||||
$Sprite2.visible = true
|
||||
$Sprite3.visible = true
|
||||
$Sprite4.visible = true
|
||||
$Sprite5.visible = true
|
||||
$Sprite6.visible = true
|
||||
$Sprite7.visible = true
|
||||
$Sprite8.visible = true
|
||||
self.position = camPos[7]
|
||||
self.scale = camZoom[7]
|
||||
9:
|
||||
$Sprite1.visible = true
|
||||
$Sprite2.visible = true
|
||||
$Sprite3.visible = true
|
||||
$Sprite4.visible = true
|
||||
$Sprite5.visible = true
|
||||
$Sprite6.visible = true
|
||||
$Sprite7.visible = true
|
||||
$Sprite8.visible = true
|
||||
self.position = camPos[8]
|
||||
self.scale = camZoom[8]
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_sprite_listener")
|
||||
|
||||
func _sprite_listener(string):
|
||||
match string:
|
||||
"sprite1":
|
||||
if $Tween.is_active():
|
||||
$Tween.remove_all()
|
||||
$Sprite1.modulate.a = 0.0
|
||||
$Sprite1.visible = true
|
||||
Dialogic.set_variable("cameraPosition", "1")
|
||||
$Tween.interpolate_property($Sprite1, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"sprite2":
|
||||
if $Tween.is_active():
|
||||
$Tween.remove_all()
|
||||
self.position = camPos[0]
|
||||
self.scale = camZoom[0]
|
||||
$Sprite2.modulate.a = 0.0
|
||||
$Sprite2.visible = true
|
||||
Dialogic.set_variable("cameraPosition", "2")
|
||||
$Tween.interpolate_property($Sprite2, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, camPos[1], camTime[1], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "scale", self.scale, camZoom[1], camTime[1], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"sprite3":
|
||||
if $Tween.is_active():
|
||||
$Tween.remove_all()
|
||||
self.position = camPos[1]
|
||||
self.scale = camZoom[1]
|
||||
$Sprite3.modulate.a = 0.0
|
||||
$Sprite3.visible = true
|
||||
Dialogic.set_variable("cameraPosition", "3")
|
||||
$Tween.interpolate_property($Sprite3, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, camPos[2], camTime[2], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "scale", self.scale, camZoom[2], camTime[2], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"sprite4":
|
||||
if $Tween.is_active():
|
||||
$Tween.remove_all()
|
||||
self.position = camPos[2]
|
||||
self.scale = camZoom[2]
|
||||
$Sprite4.modulate.a = 0.0
|
||||
$Sprite4.visible = true
|
||||
Dialogic.set_variable("cameraPosition", "4")
|
||||
$Tween.interpolate_property($Sprite4, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, camPos[3], camTime[3], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "scale", self.scale, camZoom[3], camTime[3], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"sprite5":
|
||||
if $Tween.is_active():
|
||||
$Tween.remove_all()
|
||||
self.position = camPos[3]
|
||||
self.scale = camZoom[3]
|
||||
$Sprite5.modulate.a = 0.0
|
||||
$Sprite5.visible = true
|
||||
Dialogic.set_variable("cameraPosition", "5")
|
||||
$Tween.interpolate_property($Sprite5, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, camPos[4], camTime[4], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "scale", self.scale, camZoom[4], camTime[4], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"sprite6":
|
||||
if $Tween.is_active():
|
||||
$Tween.remove_all()
|
||||
self.position = camPos[4]
|
||||
self.scale = camZoom[4]
|
||||
$Sprite6.modulate.a = 0.0
|
||||
$Sprite6.visible = true
|
||||
Dialogic.set_variable("cameraPosition", "6")
|
||||
$Tween.interpolate_property($Sprite6, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, camPos[5], camTime[5], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "scale", self.scale, camZoom[5], camTime[5], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"sprite7":
|
||||
if $Tween.is_active():
|
||||
$Tween.remove_all()
|
||||
self.position = camPos[5]
|
||||
self.scale = camZoom[5]
|
||||
$Sprite7.modulate.a = 0.0
|
||||
$Sprite7.visible = true
|
||||
Dialogic.set_variable("cameraPosition", "7")
|
||||
$Tween.interpolate_property($Sprite7, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, camPos[6], camTime[6], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "scale", self.scale, camZoom[6], camTime[6], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"sprite8":
|
||||
if $Tween.is_active():
|
||||
$Tween.remove_all()
|
||||
self.position = camPos[6]
|
||||
self.scale = camZoom[6]
|
||||
$Sprite8.modulate.a = 0.0
|
||||
$Sprite8.visible = true
|
||||
Dialogic.set_variable("cameraPosition", "8")
|
||||
$Tween.interpolate_property($Sprite8, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, camPos[7], camTime[7], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "scale", self.scale, camZoom[7], camTime[7], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
$Timer.start(camTime[7])
|
||||
timerNeed = true
|
||||
|
||||
"sprite9":
|
||||
timerNeed = false
|
||||
if $Tween.is_active():
|
||||
$Tween.remove_all()
|
||||
self.position = camSpecialPosition
|
||||
self.scale = camZoom[7]
|
||||
Dialogic.set_variable("cameraPosition", "9")
|
||||
$Tween.interpolate_property(self, "position", self.position, camPos[8], camTime[8], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "scale", self.scale, camZoom[8], camTime[8], Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
|
||||
func _on_Timer_timeout():
|
||||
if timerNeed:
|
||||
timerNeed = false
|
||||
$Tween.interpolate_property(self, "position", self.position, camSpecialPosition, camSpecialTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
47
scripts/backround_scenes_scripts/Dana_sex.gd
Normal file
47
scripts/backround_scenes_scripts/Dana_sex.gd
Normal file
|
@ -0,0 +1,47 @@
|
|||
extends Node2D
|
||||
|
||||
const fadeTime = 1.1
|
||||
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Dana_sex");
|
||||
|
||||
if Dialogic.get_variable("SexSpriteNumber") == "2":
|
||||
$Sprite1.visible = false
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_slideswitch_listener")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func _slideswitch_listener(string):
|
||||
match string:
|
||||
"sprite2":
|
||||
Dialogic.set_variable("SexSpriteNumber", 2)
|
||||
var tween = $"Tween"
|
||||
tween.interpolate_method(self, "Sprite1Interpolate", 1, 0, fadeTime, Tween.TRANS_CUBIC, 0)
|
||||
tween.start()
|
||||
|
||||
func Sprite1Interpolate(value):
|
||||
$Sprite1.self_modulate.a = value
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
return ["ui_gallery_fall_1", "ui_gallery_fall_2"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_gallery_fall_1"):
|
||||
$Sprite1.visible = true;
|
||||
$Sprite2.visible = false;
|
||||
elif setting == tr("ui_gallery_fall_2"):
|
||||
$Sprite1.visible = false;
|
||||
$Sprite2.visible = true;
|
107
scripts/backround_scenes_scripts/Death_Boy_Electricity.gd
Normal file
107
scripts/backround_scenes_scripts/Death_Boy_Electricity.gd
Normal file
|
@ -0,0 +1,107 @@
|
|||
extends Node2D
|
||||
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Death_Boy_Electricity");
|
||||
|
||||
var path = ""
|
||||
match Dialogic.get_variable("3_Death_Electricity"):
|
||||
"Red":
|
||||
path = "res://resources/graphics/backgrounds/death_electro/ALEX_ELEKTRODEAD.webp"
|
||||
GallerySingleton.AddImage("Death_Boy_Electricity_Red");
|
||||
|
||||
"Yellow":
|
||||
path = "res://resources/graphics/backgrounds/death_electro/Henry_ELEKTRODEAD.webp"
|
||||
GallerySingleton.AddImage("Death_Boy_Electricity_Yellow");
|
||||
|
||||
"White":
|
||||
path = "res://resources/graphics/backgrounds/death_electro/JUSTIN_ELEKTRODEAD.webp"
|
||||
GallerySingleton.AddImage("Death_Boy_Electricity_White");
|
||||
|
||||
"Blue_M":
|
||||
path = "res://resources/graphics/backgrounds/death_electro/MARTIN_ELEKTRODEAD.webp"
|
||||
GallerySingleton.AddImage("Death_Boy_Electricity_Blue_M");
|
||||
|
||||
"Gray":
|
||||
path = "res://resources/graphics/backgrounds/death_electro/Robert_ELEKTRODead.webp"
|
||||
GallerySingleton.AddImage("Death_Boy_Electricity_Gray");
|
||||
|
||||
|
||||
$Boy.texture = load(path)
|
||||
|
||||
func InitForGallery()->Array:
|
||||
FUCKScale()
|
||||
|
||||
var amount = 0;
|
||||
var only = "";
|
||||
var names = ["Death_Boy_Electricity_Red", "Death_Boy_Electricity_Yellow",
|
||||
"Death_Boy_Electricity_White", "Death_Boy_Electricity_Blue_M", "Death_Boy_Electricity_Gray"];
|
||||
var res = [];
|
||||
|
||||
for i in names:
|
||||
var unlocked = GallerySingleton.HaveImage(i);
|
||||
if unlocked:
|
||||
match i:
|
||||
"Death_Boy_Electricity_Red":
|
||||
res.push_back("ui_name_red");
|
||||
"Death_Boy_Electricity_Yellow":
|
||||
res.push_back("ui_name_yellow");
|
||||
"Death_Boy_Electricity_White":
|
||||
res.push_back("ui_name_white");
|
||||
"Death_Boy_Electricity_Blue_M":
|
||||
res.push_back("ui_name_blue_m");
|
||||
"Death_Boy_Electricity_Gray":
|
||||
res.push_back("ui_name_gray");
|
||||
amount += 1;
|
||||
only = i;
|
||||
|
||||
if amount == 1:
|
||||
var path = "";
|
||||
match only:
|
||||
"Death_Boy_Electricity_Red":
|
||||
path = "res://resources/graphics/backgrounds/death_electro/ALEX_ELEKTRODEAD.webp"
|
||||
"Death_Boy_Electricity_Yellow":
|
||||
path = "res://resources/graphics/backgrounds/death_electro/Henry_ELEKTRODEAD.webp"
|
||||
"Death_Boy_Electricity_White":
|
||||
path = "res://resources/graphics/backgrounds/death_electro/JUSTIN_ELEKTRODEAD.webp"
|
||||
"Death_Boy_Electricity_Blue_M":
|
||||
path = "res://resources/graphics/backgrounds/death_electro/MARTIN_ELEKTRODEAD.webp"
|
||||
"Death_Boy_Electricity_Gray":
|
||||
path = "res://resources/graphics/backgrounds/death_electro/Robert_ELEKTRODead.webp"
|
||||
$Boy.texture = load(path)
|
||||
return [];
|
||||
else :
|
||||
var firstCharacter = tr(res[0]);
|
||||
SetSettings(firstCharacter);
|
||||
return res;
|
||||
|
||||
func SetSettings(setting):
|
||||
var path = ""
|
||||
if setting == tr("ui_name_red"):
|
||||
path = "res://resources/graphics/backgrounds/death_electro/ALEX_ELEKTRODEAD.webp"
|
||||
elif setting == tr("ui_name_yellow"):
|
||||
path = "res://resources/graphics/backgrounds/death_electro/Henry_ELEKTRODEAD.webp"
|
||||
elif setting == tr("ui_name_white"):
|
||||
path = "res://resources/graphics/backgrounds/death_electro/JUSTIN_ELEKTRODEAD.webp"
|
||||
elif setting == tr("ui_name_blue_m"):
|
||||
path = "res://resources/graphics/backgrounds/death_electro/MARTIN_ELEKTRODEAD.webp"
|
||||
else :
|
||||
path = "res://resources/graphics/backgrounds/death_electro/Robert_ELEKTRODead.webp"
|
||||
scale = Vector2(0.3495, 0.3495);
|
||||
$Boy.texture = load(path)
|
||||
|
||||
func FUCKScale():
|
||||
var timer = Timer.new();
|
||||
add_child(timer);
|
||||
timer.set_wait_time(0.05);
|
||||
timer.set_one_shot(true);
|
||||
timer.start();
|
||||
timer.connect("timeout", self, "FUCKFUCK", [timer]);
|
||||
|
||||
func FUCKFUCK(timer):
|
||||
call_deferred("set_scale", Vector2(0.3495, 0.3495));
|
||||
timer.disconnect("timeout", self, "FUCKFUCK")
|
||||
remove_child(timer);
|
26
scripts/backround_scenes_scripts/Death_Car.gd
Normal file
26
scripts/backround_scenes_scripts/Death_Car.gd
Normal file
|
@ -0,0 +1,26 @@
|
|||
extends Node2D
|
||||
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Death_Car");
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Rain Loop.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_car_listener")
|
||||
|
||||
func _car_listener(string):
|
||||
match string:
|
||||
"headlights_off":
|
||||
$lights.visible = false
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
return [];
|
||||
|
||||
func SetSettings(_setting):
|
||||
pass;
|
24
scripts/backround_scenes_scripts/Death_Electro.gd
Normal file
24
scripts/backround_scenes_scripts/Death_Electro.gd
Normal file
|
@ -0,0 +1,24 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Death_Electro");
|
||||
|
||||
func InitForGallery()->Array:
|
||||
FUCKScale()
|
||||
return [];
|
||||
|
||||
func FUCKScale():
|
||||
var timer = Timer.new();
|
||||
add_child(timer);
|
||||
timer.set_wait_time(0.05);
|
||||
timer.set_one_shot(true);
|
||||
timer.start();
|
||||
timer.connect("timeout", self, "FUCKFUCK", [timer]);
|
||||
|
||||
func FUCKFUCK(timer):
|
||||
call_deferred("set_scale", Vector2(0.3495, 0.3495));
|
||||
timer.disconnect("timeout", self, "FUCKFUCK")
|
||||
remove_child(timer);
|
79
scripts/backround_scenes_scripts/Death_Poison.gd
Normal file
79
scripts/backround_scenes_scripts/Death_Poison.gd
Normal file
|
@ -0,0 +1,79 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Death_Poison");
|
||||
|
||||
var whoDied = Dialogic.get_variable("6_Death_Poison")
|
||||
var path = ""
|
||||
match whoDied:
|
||||
"Green":
|
||||
path = "res://resources/graphics/backgrounds/death_poison/AgathaPoison.webp"
|
||||
GallerySingleton.AddImage("Death_Poison_Green");
|
||||
"Purple":
|
||||
path = "res://resources/graphics/backgrounds/death_poison/DanaPoison.webp"
|
||||
GallerySingleton.AddImage("Death_Poison_Purple");
|
||||
"Black":
|
||||
path = "res://resources/graphics/backgrounds/death_poison/Linda Poison.webp"
|
||||
GallerySingleton.AddImage("Death_Poison_Black");
|
||||
"none":
|
||||
path = "res://resources/graphics/backgrounds/death_poison/HughPoison.webp"
|
||||
GallerySingleton.AddImage("Death_Poison_Hugh");
|
||||
|
||||
$Char.texture = load(path)
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
var amount = 0;
|
||||
var only = "";
|
||||
var names = ["Death_Poison_Green", "Death_Poison_Purple", "Death_Poison_Black", "Death_Poison_Hugh"];
|
||||
var res = [];
|
||||
|
||||
for i in names:
|
||||
var unlocked = GallerySingleton.HaveImage(i);
|
||||
if unlocked:
|
||||
match i:
|
||||
"Death_Poison_Green":
|
||||
res.push_back("ui_name_green");
|
||||
"Death_Poison_Purple":
|
||||
res.push_back("ui_name_purple");
|
||||
"Death_Poison_Black":
|
||||
res.push_back("ui_name_black");
|
||||
"Death_Poison_Hugh":
|
||||
res.push_back("ui_name_mc");
|
||||
amount += 1;
|
||||
only = i;
|
||||
|
||||
if amount == 1:
|
||||
var path = "";
|
||||
match only:
|
||||
"Death_Poison_Green":
|
||||
path = "res://resources/graphics/backgrounds/death_poison/AgathaPoison.webp"
|
||||
"Death_Poison_Purple":
|
||||
path = "res://resources/graphics/backgrounds/death_poison/DanaPoison.webp"
|
||||
"Death_Poison_Black":
|
||||
path = "res://resources/graphics/backgrounds/death_poison/Linda Poison.webp"
|
||||
"Death_Poison_Hugh":
|
||||
path = "res://resources/graphics/backgrounds/death_poison/HughPoison.webp"
|
||||
$Char.texture = load(path);
|
||||
return [];
|
||||
else :
|
||||
var firstCharacter = tr(res[0]);
|
||||
SetSettings(firstCharacter)
|
||||
return res;
|
||||
|
||||
|
||||
func SetSettings(setting):
|
||||
var path = "";
|
||||
if setting == tr("ui_name_green"):
|
||||
path = "res://resources/graphics/backgrounds/death_poison/AgathaPoison.webp";
|
||||
elif setting == tr("ui_name_purple"):
|
||||
path = "res://resources/graphics/backgrounds/death_poison/DanaPoison.webp";
|
||||
elif setting == tr("ui_name_black"):
|
||||
path = "res://resources/graphics/backgrounds/death_poison/Linda Poison.webp";
|
||||
else :
|
||||
path = "res://resources/graphics/backgrounds/death_poison/HughPoison.webp";
|
||||
$Char.texture = load(path)
|
15
scripts/backround_scenes_scripts/Death_Stairs.gd
Normal file
15
scripts/backround_scenes_scripts/Death_Stairs.gd
Normal file
|
@ -0,0 +1,15 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Death_Stairs");
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
return [];
|
||||
|
||||
func SetSettings(setting):
|
||||
pass
|
134
scripts/backround_scenes_scripts/Death_knife.gd
Normal file
134
scripts/backround_scenes_scripts/Death_knife.gd
Normal file
|
@ -0,0 +1,134 @@
|
|||
extends Node2D
|
||||
|
||||
const fadeTime = 3.0
|
||||
|
||||
const zoomStart = 1.0
|
||||
const zoomEnd = 0.97
|
||||
const bloodStart = 0.2
|
||||
const bloodEnd = 0.9
|
||||
const timeParam = 1.7
|
||||
|
||||
var isDead
|
||||
var bloodIncrement
|
||||
var zoomIncrement
|
||||
var currentZoom
|
||||
var currentEnergy
|
||||
var isIncreasing
|
||||
var screenWidth;
|
||||
var screenHeight;
|
||||
var xOffset;
|
||||
var yOffset
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Death_knife")
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_frame_switch_listener")
|
||||
|
||||
|
||||
isDead = false
|
||||
dialogicNode.connect("dialogic_signal", self, "_begin_death")
|
||||
bloodIncrement = (bloodEnd - bloodStart) / timeParam;
|
||||
zoomIncrement = (zoomEnd - zoomStart) / timeParam;
|
||||
currentZoom = zoomStart
|
||||
isIncreasing = true
|
||||
currentEnergy = 0
|
||||
screenWidth = SettingsSingleton.GetCurrectScreenResolutionVector2().x
|
||||
screenHeight = SettingsSingleton.GetCurrectScreenResolutionVector2().y
|
||||
|
||||
func InitScene(saveSlot:int):
|
||||
pass
|
||||
|
||||
func _frame_switch_listener(string):
|
||||
match string:
|
||||
"sprite2":
|
||||
|
||||
|
||||
$frame3.self_modulate.a = 0
|
||||
$frame3.visible = true
|
||||
var tween = $"Tween"
|
||||
tween.interpolate_method(self, "frame3Interpolate", 0, 1, fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
tween.start()
|
||||
"death":
|
||||
|
||||
$frame1.visible = false
|
||||
var tween = $"Tween"
|
||||
tween.interpolate_method(self, "frame3Interpolate", 1, 0, fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
tween.interpolate_property($Sprite3, "modulate", Color(1, 1, 1, 1), Color.black, fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
tween.start()
|
||||
|
||||
func _process(delta):
|
||||
if (isDead):
|
||||
if (isIncreasing):
|
||||
if (currentEnergy <= bloodEnd):
|
||||
|
||||
currentEnergy += bloodIncrement * delta
|
||||
currentZoom += zoomIncrement * delta
|
||||
$death / Light2D.self_modulate.a = currentEnergy
|
||||
xOffset = (1 - currentZoom) * ($death / Polygon2D.get_global_transform_with_canvas().origin.x) / (screenWidth);
|
||||
print(xOffset)
|
||||
yOffset = (1 - currentZoom) * (screenHeight - $death / Polygon2D.get_global_transform_with_canvas().origin.y) / screenHeight;
|
||||
var offset = Vector2(xOffset, yOffset);
|
||||
var tiling = Vector2(currentZoom, currentZoom)
|
||||
$death / Polygon2D.material.set_shader_param("offset", offset)
|
||||
$death / Polygon2D.material.set_shader_param("tiling", tiling);
|
||||
else :
|
||||
isIncreasing = false
|
||||
if ( not isIncreasing):
|
||||
if (currentEnergy >= bloodStart):
|
||||
|
||||
currentEnergy -= bloodIncrement * delta
|
||||
currentZoom -= zoomIncrement * delta
|
||||
$death / Light2D.self_modulate.a = currentEnergy
|
||||
xOffset = (1 - currentZoom) * ($death / Polygon2D.get_global_transform_with_canvas().origin.x) / (screenWidth);
|
||||
yOffset = (1 - currentZoom) * (screenHeight - $death / Polygon2D.get_global_transform_with_canvas().origin.y) / screenHeight;
|
||||
var offset = Vector2(xOffset, yOffset);
|
||||
$death / Polygon2D.material.set_shader_param("offset", offset)
|
||||
$death / Polygon2D.material.set_shader_param("tiling", Vector2(currentZoom, currentZoom));
|
||||
else :
|
||||
isIncreasing = true
|
||||
else :pass
|
||||
|
||||
func _begin_death(string):
|
||||
match string:
|
||||
"death2":
|
||||
$death.visible = true;
|
||||
var tween = $death.get_child(0).get_child(0)
|
||||
var light = $death.get_child(0)
|
||||
tween.interpolate_method(self, "bloodInterpolate", 0.0, bloodStart, 1.0, Tween.TRANS_LINEAR, 0);
|
||||
tween.start()
|
||||
yield ($death.get_child(0).get_child(0), "tween_all_completed")
|
||||
currentEnergy = bloodStart
|
||||
$death.get_child(0).self_modulate.a = bloodStart
|
||||
isDead = true;
|
||||
|
||||
func bloodInterpolate(value):
|
||||
$death / Light2D.self_modulate.a = value;
|
||||
|
||||
func frame3Interpolate(value):
|
||||
$frame3.self_modulate.a = value
|
||||
|
||||
func InitForGallery()->Array:
|
||||
$frame1.visible = true;
|
||||
$frame2.visible = false;
|
||||
$frame3.visible = false;
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
return ["ui_gallery_fall_1", "ui_gallery_fall_2", "ui_gallery_fall_3"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_gallery_fall_1"):
|
||||
$frame1.visible = true;
|
||||
$frame2.visible = false;
|
||||
$frame3.visible = false;
|
||||
elif setting == tr("ui_gallery_fall_2"):
|
||||
$frame1.visible = false;
|
||||
$frame2.visible = true;
|
||||
$frame3.visible = false;
|
||||
elif setting == tr("ui_gallery_fall_3"):
|
||||
$frame1.visible = false;
|
||||
$frame2.visible = false;
|
||||
$frame3.visible = true;
|
15
scripts/backround_scenes_scripts/Death_shot_epilogue.gd
Normal file
15
scripts/backround_scenes_scripts/Death_shot_epilogue.gd
Normal file
|
@ -0,0 +1,15 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Death_shot_epilogue");
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
$rain.visible = true;
|
||||
return [];
|
||||
|
||||
func SetSettings(setting):
|
||||
pass;
|
58
scripts/backround_scenes_scripts/Death_shot_girl.gd
Normal file
58
scripts/backround_scenes_scripts/Death_shot_girl.gd
Normal file
|
@ -0,0 +1,58 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Death_shot_girl");
|
||||
|
||||
if (Dialogic.get_variable("TimelineSave") == "Timeline_167" or Dialogic.get_variable("TimelineSave") == "Timeline_167w"):
|
||||
if Dialogic.get_variable("Killer") == "Pink":
|
||||
$Pink.visible = true
|
||||
GallerySingleton.AddImage("Death_shot_girl_pink");
|
||||
else :
|
||||
$Blue.visible = true
|
||||
GallerySingleton.AddImage("Death_shot_girl_blue");
|
||||
else :
|
||||
if Dialogic.get_variable("Killer") == "Pink":
|
||||
$Blue.visible = true
|
||||
GallerySingleton.AddImage("Death_shot_girl_blue");
|
||||
else :
|
||||
$Pink.visible = true
|
||||
GallerySingleton.AddImage("Death_shot_girl_pink");
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
var blueDead = GallerySingleton.HaveImage("Death_shot_girl_blue");
|
||||
var pinkDead = GallerySingleton.HaveImage("Death_shot_girl_pink");
|
||||
|
||||
if blueDead and pinkDead:
|
||||
FUCKVisibile($Pink)
|
||||
return ["ui_name_pink", "ui_name_blue_f"];
|
||||
elif blueDead and not pinkDead:
|
||||
FUCKVisibile($Blue)
|
||||
else :
|
||||
FUCKVisibile($Pink)
|
||||
return [];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_name_pink"):
|
||||
$Pink.visible = true;
|
||||
$Blue.visible = false;
|
||||
else :
|
||||
$Pink.visible = false;
|
||||
$Blue.visible = true;
|
||||
|
||||
func FUCKVisibile(control):
|
||||
var timer = Timer.new();
|
||||
add_child(timer);
|
||||
timer.set_wait_time(0.1);
|
||||
timer.set_one_shot(true);
|
||||
timer.start();
|
||||
timer.connect("timeout", self, "FUCKFUCK", [control, timer]);
|
||||
|
||||
func FUCKFUCK(control, timer):
|
||||
control.call_deferred("set_visible", true);
|
||||
timer.disconnect("timeout", self, "FUCKFUCK")
|
||||
remove_child(timer);
|
24
scripts/backround_scenes_scripts/Death_shot_triptih.gd
Normal file
24
scripts/backround_scenes_scripts/Death_shot_triptih.gd
Normal file
|
@ -0,0 +1,24 @@
|
|||
extends Node2D
|
||||
|
||||
const zoomingTime = 14.0
|
||||
const delayTime = 1.5
|
||||
const endScale = Vector2(2.0, 2.0)
|
||||
const endPosition = Vector2( - 1220.0, - 356.0)
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Death_shot");
|
||||
|
||||
$Timer.set_wait_time(delayTime)
|
||||
$Timer.set_one_shot(true)
|
||||
$Timer.start()
|
||||
yield ($Timer, "timeout")
|
||||
$Tween.interpolate_property(self, "scale", Vector2(1.0, 1.0), endScale, zoomingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", Vector2(0.0, 0.0), endPosition, zoomingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
return [];
|
42
scripts/backround_scenes_scripts/Death_stairs_girl.gd
Normal file
42
scripts/backround_scenes_scripts/Death_stairs_girl.gd
Normal file
|
@ -0,0 +1,42 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
Dialogic.set_variable("Stairs", "1");
|
||||
|
||||
var deadGirl = Dialogic.get_variable("7_Death_Stairs")
|
||||
if deadGirl == "Green":
|
||||
$Green.visible = true
|
||||
elif deadGirl == "Black":
|
||||
$Black.visible = true
|
||||
else :
|
||||
$Purple.visible = true
|
||||
|
||||
|
||||
if int(Dialogic.get_variable("Center")) == 1:
|
||||
$Triptih / center.visible = true
|
||||
if int(Dialogic.get_variable("Left")) == 1:
|
||||
$Triptih / left.visible = true
|
||||
if int(Dialogic.get_variable("Right")) == 1:
|
||||
$Triptih / right.visible = true
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_triptih_listener")
|
||||
|
||||
func _triptih_listener(string):
|
||||
match string:
|
||||
"blue_back":
|
||||
Dialogic.set_variable("Right", 1)
|
||||
$Triptih / right.visible = true
|
||||
"pink_back":
|
||||
Dialogic.set_variable("Left", 1)
|
||||
$Triptih / left.visible = true
|
||||
"red_back":
|
||||
Dialogic.set_variable("Center", 1)
|
||||
$Triptih / center.visible = true
|
||||
"white_back":
|
||||
Dialogic.set_variable("Center", 1)
|
||||
$Triptih / center.visible = true
|
||||
"girl_remove":
|
||||
Dialogic.set_variable("NoGirl", 1)
|
||||
|
||||
|
85
scripts/backround_scenes_scripts/DomikVnutri.gd
Normal file
85
scripts/backround_scenes_scripts/DomikVnutri.gd
Normal file
|
@ -0,0 +1,85 @@
|
|||
extends Node2D
|
||||
|
||||
var timerStarted = false;
|
||||
|
||||
var defaultCursor = load("res://resources/cursors/arrow2.webp");
|
||||
|
||||
var flameState;
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddBackground("DomikVnutri");
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_domik_listener")
|
||||
flameState = 0;
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/pomeschenie-snaruji-dojd-i-groza.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
|
||||
func _domik_listener(value):
|
||||
if value == "start_timer":
|
||||
timerStarted = true;
|
||||
$DeathTimer.start();
|
||||
$Flame.visible = true;
|
||||
elif value == "barrel":
|
||||
var trapdoor = $ClosedTrapdoor;
|
||||
trapdoor.visible = true;
|
||||
var modulateValue = Color(1, 1, 1, 1);
|
||||
$TrapdoorTween.interpolate_property(trapdoor, "modulate", trapdoor.modulate, modulateValue, 1.25, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT, 0)
|
||||
$TrapdoorTween.start();
|
||||
pass;
|
||||
elif value == "trapdoor":
|
||||
var trapdoor = $OpenedTrapdoor;
|
||||
trapdoor.visible = true;
|
||||
var modulateValue = Color(1, 1, 1, 1);
|
||||
$TrapdoorTween.interpolate_property(trapdoor, "modulate", trapdoor.modulate, modulateValue, 0.5, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT, 0)
|
||||
$TrapdoorTween.start();
|
||||
pass;
|
||||
|
||||
func _process(_delta):
|
||||
if not timerStarted:
|
||||
return ;
|
||||
|
||||
var value = $DeathTimer.time_left;
|
||||
|
||||
if flameState == 0:
|
||||
|
||||
|
||||
$Flame / flame.position.y = 155 * (value - 90) / 9 + 710;
|
||||
|
||||
|
||||
elif flameState == 1:
|
||||
|
||||
|
||||
$Flame / flame.position.y = 6 * (value - 40) - 840;
|
||||
|
||||
|
||||
func _on_DeathTimer_timeout():
|
||||
timerStarted = false;
|
||||
|
||||
Input.set_custom_mouse_cursor(defaultCursor);
|
||||
|
||||
var alternative = get_parent().get_parent().get_node("AlternativeChoices/Control");
|
||||
|
||||
if alternative != null:
|
||||
alternative.TimerOut();
|
||||
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "END");
|
||||
|
||||
|
||||
$DeathTimer.disconnect("timeout", self, "_on_DeathTimer_timeout");
|
||||
flameState = 1;
|
||||
$DeathTimer.start(40);
|
||||
timerStarted = true;
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
return [];
|
||||
|
||||
func SetSettings(setting):
|
||||
pass;
|
70
scripts/backround_scenes_scripts/Emiliya_Go_Away.gd
Normal file
70
scripts/backround_scenes_scripts/Emiliya_Go_Away.gd
Normal file
|
@ -0,0 +1,70 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Emiliya_Go_Away");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var videoPlayer = $Video / VideoPlayer
|
||||
var path = ""
|
||||
if int(Dialogic.get_variable("Is_White_Dead")) == 1:
|
||||
path = "res://resources/video/новый_син_глок.ogv"
|
||||
else :
|
||||
path = "res://resources/video/новый_син_беретта.ogv"
|
||||
videoPlayer.stream = load(path)
|
||||
videoPlayer.play()
|
||||
|
||||
func _pistol_listener(string):
|
||||
match string:
|
||||
"pistol_drop":
|
||||
if int(Dialogic.get_variable("Is_White_Dead")) == 0:
|
||||
$whitePistolOff / white.visible = false
|
||||
if int(Dialogic.get_variable("Is_Red_Dead")) == 0:
|
||||
$redPistolOff / red.visible = false
|
||||
"pistol_off":
|
||||
$noPistol.visible = true
|
||||
|
||||
func InitForGallery()->Array:
|
||||
$Video.scale = Vector2(0.5, 0.5)
|
||||
|
||||
var glock = GallerySingleton.HaveImage("Emiliya_Go_Away_glock");
|
||||
var beretta = GallerySingleton.HaveImage("Emiliya_Go_Away_beretta");
|
||||
|
||||
var videoPlayer = $Video / VideoPlayer
|
||||
var path = ""
|
||||
|
||||
if glock and beretta:
|
||||
path = "res://resources/video/новый_син_глок.ogv"
|
||||
videoPlayer.stream = load(path)
|
||||
videoPlayer.play()
|
||||
return ["ui_gallery_fall_1", "ui_gallery_fall_2"];
|
||||
elif glock and not beretta:
|
||||
path = "res://resources/video/новый_син_глок.ogv"
|
||||
else :
|
||||
path = "res://resources/video/новый_син_беретта.ogv"
|
||||
videoPlayer.stream = load(path)
|
||||
videoPlayer.play()
|
||||
return [];
|
||||
|
||||
func SetSettings(setting):
|
||||
var videoPlayer = $Video / VideoPlayer
|
||||
var path = ""
|
||||
|
||||
if setting == tr("ui_gallery_fall_1"):
|
||||
path = "res://resources/video/новый_син_глок.ogv"
|
||||
elif setting == tr("ui_gallery_fall_2"):
|
||||
path = "res://resources/video/новый_син_беретта.ogv"
|
||||
|
||||
videoPlayer.stream = load(path)
|
||||
videoPlayer.play()
|
86
scripts/backround_scenes_scripts/Emiliya_sex.gd
Normal file
86
scripts/backround_scenes_scripts/Emiliya_sex.gd
Normal file
|
@ -0,0 +1,86 @@
|
|||
extends Node2D
|
||||
|
||||
const fadeTime = 2.2
|
||||
const fadeTime2 = 1.8
|
||||
|
||||
func _ready():
|
||||
UnderwearText();
|
||||
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Emiliya_sex");
|
||||
|
||||
if Dialogic.get_variable("SexSpriteNumber") == "2":
|
||||
$Sprite1.visible = false
|
||||
elif Dialogic.get_variable("SexSpriteNumber") == "3":
|
||||
$Sprite1.visible = false
|
||||
$Sprite2.visible = false
|
||||
|
||||
$Underwear / HandOver.visible = true;
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_slideswitch_listener")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func UnderwearText():
|
||||
var locale = TranslationServer.get_locale();
|
||||
var path = "";
|
||||
if locale == "ru":
|
||||
path = "res://resources/graphics/backgrounds/emiliya_sex/underwear/ru.webp";
|
||||
elif locale == "zh":
|
||||
path = "res://resources/graphics/backgrounds/emiliya_sex/underwear/zh.webp";
|
||||
else :
|
||||
path = "res://resources/graphics/backgrounds/emiliya_sex/underwear/en.webp";
|
||||
$Underwear / Text.texture = load(path);
|
||||
|
||||
func _slideswitch_listener(string):
|
||||
match string:
|
||||
"sprite2":
|
||||
Dialogic.set_variable("SexSpriteNumber", 2)
|
||||
var tween = $"Tween"
|
||||
tween.interpolate_method(self, "Sprite1Interpolate", 1, 0, fadeTime, Tween.TRANS_CUBIC, 0)
|
||||
tween.start()
|
||||
"sprite3":
|
||||
Dialogic.set_variable("SexSpriteNumber", 3)
|
||||
var tween = $"Tween"
|
||||
tween.interpolate_method(self, "Sprite2Interpolate", 1, 0, fadeTime2, Tween.TRANS_CUBIC, 0)
|
||||
tween.start()
|
||||
$Underwear / HandOver.visible = true;
|
||||
|
||||
|
||||
func Sprite1Interpolate(value):
|
||||
$Sprite1.self_modulate.a = value
|
||||
|
||||
func Sprite2Interpolate(value):
|
||||
$Sprite2.self_modulate.a = value
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
return ["ui_gallery_fall_1", "ui_gallery_fall_2", "ui_gallery_fall_3"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_gallery_fall_1"):
|
||||
$Sprite1.visible = true;
|
||||
$Sprite2.visible = false;
|
||||
$Sprite3.visible = false;
|
||||
$Underwear / HandOver.visible = false;
|
||||
elif setting == tr("ui_gallery_fall_2"):
|
||||
$Sprite1.visible = false;
|
||||
$Sprite2.visible = true;
|
||||
$Sprite3.visible = false;
|
||||
$Underwear / HandOver.visible = false;
|
||||
else :
|
||||
$Sprite1.visible = false;
|
||||
$Sprite2.visible = false;
|
||||
$Sprite3.visible = true;
|
||||
$Underwear / HandOver.visible = true;
|
56
scripts/backround_scenes_scripts/Final_Amanda.gd
Normal file
56
scripts/backround_scenes_scripts/Final_Amanda.gd
Normal file
|
@ -0,0 +1,56 @@
|
|||
extends Node2D
|
||||
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Final_Amanda")
|
||||
|
||||
if int(Dialogic.get_variable("Is_White_Dead")) == 0:
|
||||
$white.visible = true
|
||||
GallerySingleton.AddImage("Final_Amanda_glock")
|
||||
if int(Dialogic.get_variable("Is_Red_Dead")) == 0:
|
||||
$red.visible = true
|
||||
GallerySingleton.AddImage("Final_Amanda_beretta")
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Rain Loop.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
var glock = GallerySingleton.HaveImage("Final_Amanda_glock");
|
||||
var beretta = GallerySingleton.HaveImage("Final_Amanda_beretta");
|
||||
|
||||
if glock and beretta:
|
||||
FUCKVisibile($white);
|
||||
return ["ui_gallery_glock", "ui_gallery_beretta"];
|
||||
elif glock and not beretta:
|
||||
FUCKVisibile($white);
|
||||
|
||||
else :
|
||||
FUCKVisibile($red);
|
||||
|
||||
return [];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_gallery_glock"):
|
||||
$white.visible = true;
|
||||
$red.visible = false;
|
||||
elif setting == tr("ui_gallery_beretta"):
|
||||
$white.visible = false;
|
||||
$red.visible = true;
|
||||
|
||||
func FUCKVisibile(control):
|
||||
var timer = Timer.new();
|
||||
add_child(timer);
|
||||
timer.set_wait_time(0.02);
|
||||
timer.set_one_shot(true);
|
||||
timer.start();
|
||||
timer.connect("timeout", self, "FUCKFUCK", [control, timer]);
|
||||
|
||||
func FUCKFUCK(control, timer):
|
||||
control.call_deferred("set_visible", true);
|
||||
timer.disconnect("timeout", self, "FUCKFUCK")
|
||||
remove_child(timer);
|
55
scripts/backround_scenes_scripts/Final_Emiliya.gd
Normal file
55
scripts/backround_scenes_scripts/Final_Emiliya.gd
Normal file
|
@ -0,0 +1,55 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Final_Emiliya")
|
||||
|
||||
if int(Dialogic.get_variable("Is_White_Dead")) == 0:
|
||||
$white.visible = true
|
||||
GallerySingleton.AddImage("Final_Emiliya_glock")
|
||||
if int(Dialogic.get_variable("Is_Red_Dead")) == 0:
|
||||
$red.visible = true
|
||||
GallerySingleton.AddImage("Final_Emiliya_beretta")
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Rain Loop.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
var glock = GallerySingleton.HaveImage("Final_Emiliya_glock");
|
||||
var beretta = GallerySingleton.HaveImage("Final_Emiliya_beretta");
|
||||
|
||||
if glock and beretta:
|
||||
FUCKVisibile($white);
|
||||
return ["ui_gallery_glock", "ui_gallery_beretta"];
|
||||
elif glock and not beretta:
|
||||
FUCKVisibile($white);
|
||||
|
||||
else :
|
||||
FUCKVisibile($red);
|
||||
|
||||
return [];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_gallery_glock"):
|
||||
$white.visible = true;
|
||||
$red.visible = false;
|
||||
elif setting == tr("ui_gallery_beretta"):
|
||||
$white.visible = false;
|
||||
$red.visible = true;
|
||||
|
||||
func FUCKVisibile(control):
|
||||
var timer = Timer.new();
|
||||
add_child(timer);
|
||||
timer.set_wait_time(0.02);
|
||||
timer.set_one_shot(true);
|
||||
timer.start();
|
||||
timer.connect("timeout", self, "FUCKFUCK", [control, timer]);
|
||||
|
||||
func FUCKFUCK(control, timer):
|
||||
control.call_deferred("set_visible", true);
|
||||
timer.disconnect("timeout", self, "FUCKFUCK")
|
||||
remove_child(timer);
|
158
scripts/backround_scenes_scripts/Garaj.gd
Normal file
158
scripts/backround_scenes_scripts/Garaj.gd
Normal file
|
@ -0,0 +1,158 @@
|
|||
extends Node2D
|
||||
|
||||
var isDay:bool
|
||||
var isLightOn:bool
|
||||
var isDoorOpen:bool
|
||||
var isCarVisible:bool
|
||||
const fadeTime = 1.5
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddBackground("Garaj");
|
||||
|
||||
isDay = Dialogic.get_variable("ItIsDay") == "true";
|
||||
isLightOn = Dialogic.get_variable("GarajLightOn") == "1";
|
||||
isDoorOpen = Dialogic.get_variable("DoorOpen") == "1";
|
||||
isCarVisible = Dialogic.get_variable("Car") == "1";
|
||||
|
||||
if Dialogic.get_variable("ItIsDay") == "true":
|
||||
$Cat.Init(2, 5);
|
||||
$Cat.position = Vector2(1550, 790);
|
||||
|
||||
get_tree().root.get_node("Root").StopSFX();
|
||||
else :
|
||||
$Cat.visible = false;
|
||||
$rain.visible = true;
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Rain Loop.ogg";
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath);
|
||||
|
||||
SetSceneState()
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_lightsdoor_listener")
|
||||
|
||||
func _lightsdoor_listener(string):
|
||||
match string:
|
||||
"lights_on":
|
||||
Dialogic.set_variable("GarajLightOn", 1)
|
||||
isLightOn = true
|
||||
SetSceneState()
|
||||
"lights_off":
|
||||
Dialogic.set_variable("GarajLightOn", 0)
|
||||
isLightOn = false
|
||||
SetSceneState()
|
||||
"door_open":
|
||||
Dialogic.set_variable("DoorOpen", 1)
|
||||
isDoorOpen = true
|
||||
SetSceneState()
|
||||
"door_close":
|
||||
Dialogic.set_variable("DoorOpen", 0)
|
||||
isDoorOpen = false
|
||||
SetSceneState()
|
||||
"car_off":
|
||||
Dialogic.set_variable("Car", 0)
|
||||
$Tween.interpolate_property($Car, "modulate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"add_henry":
|
||||
$removable / Yellow.visible = Dialogic.get_variable("Is_Yellow_Dead") == "0";
|
||||
"remove_henry":
|
||||
$removable / Yellow.visible = false;
|
||||
|
||||
func SetSceneState():
|
||||
var path = "";
|
||||
if not isDoorOpen:
|
||||
if isDay:
|
||||
path = "res://resources/graphics/backgrounds/garaj/Garage4K-4.webp";
|
||||
|
||||
else :
|
||||
path = "res://resources/graphics/backgrounds/garaj/Garage4K-3.webp";
|
||||
|
||||
else :
|
||||
if isDay:
|
||||
if isLightOn and isDoorOpen and isCarVisible:
|
||||
path = "res://resources/graphics/backgrounds/garaj/Garage4K-2.webp";
|
||||
|
||||
elif not isLightOn and isDoorOpen and isCarVisible:
|
||||
|
||||
path = "res://resources/graphics/backgrounds/garaj/Garage4K-LightsOff.webp";
|
||||
else :
|
||||
path = "res://resources/graphics/backgrounds/garaj/NoCar3.webp";
|
||||
|
||||
else :
|
||||
if isLightOn and isDoorOpen and isCarVisible:
|
||||
path = "res://resources/graphics/backgrounds/garaj/Garage4K-1.webp";
|
||||
|
||||
elif not isLightOn and isDoorOpen and isCarVisible:
|
||||
|
||||
path = "res://resources/graphics/backgrounds/garaj/NoCar1.webp"
|
||||
$Car.visible = true
|
||||
|
||||
elif isLightOn and isDoorOpen and not isCarVisible:
|
||||
path = "res://resources/graphics/backgrounds/garaj/NoCar2.webp";
|
||||
|
||||
else :
|
||||
path = "res://resources/graphics/backgrounds/garaj/NoCar1.webp";
|
||||
|
||||
|
||||
$Garage.texture = load(path);
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
isDay = false;
|
||||
isLightOn = false;
|
||||
isDoorOpen = false;
|
||||
isCarVisible = false;
|
||||
$Cat.visible = false;
|
||||
|
||||
SetGalleryState();
|
||||
|
||||
return ["ui_day", "ui_gallery_light", "ui_gallery_door", "ui_gallery_car"];
|
||||
|
||||
func SetToggleSettings(button):
|
||||
$Car.visible = false;
|
||||
|
||||
var text = button.text;
|
||||
var state = button.pressed;
|
||||
if text == tr("ui_day"):
|
||||
isDay = state
|
||||
elif text == tr("ui_gallery_light"):
|
||||
isLightOn = state
|
||||
elif text == tr("ui_gallery_door"):
|
||||
isDoorOpen = state;
|
||||
elif text == tr("ui_gallery_car"):
|
||||
isCarVisible = state;
|
||||
|
||||
SetGalleryState();
|
||||
|
||||
func SetGalleryState():
|
||||
var path = "";
|
||||
if not isDoorOpen:
|
||||
if isDay:
|
||||
path = "res://resources/graphics/backgrounds/garaj/Garage4K-4.webp";
|
||||
else :
|
||||
path = "res://resources/graphics/backgrounds/garaj/Garage4K-3.webp";
|
||||
else :
|
||||
if isDay:
|
||||
if isLightOn and isDoorOpen and isCarVisible:
|
||||
path = "res://resources/graphics/backgrounds/garaj/Garage4K-2.webp";
|
||||
elif not isLightOn and isDoorOpen and isCarVisible:
|
||||
path = "res://resources/graphics/backgrounds/garaj/Garage4K-LightsOff.webp";
|
||||
else :
|
||||
path = "res://resources/graphics/backgrounds/garaj/NoCar3.webp";
|
||||
else :
|
||||
if isLightOn and isDoorOpen and isCarVisible:
|
||||
path = "res://resources/graphics/backgrounds/garaj/Garage4K-1.webp";
|
||||
elif not isLightOn and isDoorOpen and isCarVisible:
|
||||
path = "res://resources/graphics/backgrounds/garaj/NoCar1.webp"
|
||||
$Car.visible = true
|
||||
elif isLightOn and isDoorOpen and not isCarVisible:
|
||||
path = "res://resources/graphics/backgrounds/garaj/NoCar2.webp";
|
||||
else :
|
||||
path = "res://resources/graphics/backgrounds/garaj/NoCar1.webp";
|
||||
|
||||
$Garage.texture = load(path);
|
||||
|
266
scripts/backround_scenes_scripts/Hospital.gd
Normal file
266
scripts/backround_scenes_scripts/Hospital.gd
Normal file
|
@ -0,0 +1,266 @@
|
|||
extends Node2D
|
||||
|
||||
const zoomingTime = 3.0
|
||||
const camera0Position = Vector2(0.0, 0.0)
|
||||
const scale0Position = Vector2(1.0, 1.0)
|
||||
const camera1Position = Vector2(0.0, - 508.0)
|
||||
const scale1Position = Vector2(1.6, 1.6)
|
||||
const camera2Position = Vector2( - 1403.0, - 810.0)
|
||||
const scale2Position = Vector2(1.8, 1.8)
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddBackground("Hospital");
|
||||
|
||||
match Dialogic.get_variable("cameraPosition"):
|
||||
"0":
|
||||
self.scale = scale0Position
|
||||
self.position = camera0Position
|
||||
"1":
|
||||
self.scale = scale1Position
|
||||
self.position = camera1Position
|
||||
blur_change(5.0)
|
||||
$TweenBlur.remove_all()
|
||||
$TweenBlur.interpolate_method(self, "blur_change", 5.0, 0.0, zoomingTime, Tween.TRANS_LINEAR, 0)
|
||||
$TweenBlur.start()
|
||||
"2":
|
||||
self.scale = scale2Position
|
||||
self.position = camera2Position
|
||||
_:
|
||||
self.scale = scale0Position
|
||||
self.position = camera0Position
|
||||
|
||||
var chosen = Dialogic.get_variable("Chosen_Girl")
|
||||
match chosen:
|
||||
"Pink":
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/pinkflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/pinkeye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/pinkthing.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/light3.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/windOn.webp")
|
||||
GallerySingleton.AddBackground("Hospital_Pink");
|
||||
"Blue":
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/blueflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/blueeye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/bluething.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/light3.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/windOn.webp")
|
||||
GallerySingleton.AddBackground("Hospital_Blue");
|
||||
"Green":
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/greenflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/greeneye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/greenthing.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/light2.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/windOnOff.webp")
|
||||
GallerySingleton.AddBackground("Hospital_Green");
|
||||
"Purple":
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/violetflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/violeteye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/violetthing.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/light2.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/windOnOff.webp")
|
||||
GallerySingleton.AddBackground("Hospital_Purple");
|
||||
"Orange":
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/orangeflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/orangeeye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/orangething.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/light3.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/windOn.webp")
|
||||
GallerySingleton.AddBackground("Hospital_Orange");
|
||||
"Black":
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/blackflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/blackeye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/blackthing.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/light2.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/windOnOff.webp")
|
||||
GallerySingleton.AddBackground("Hospital_Black");
|
||||
_:
|
||||
$Item.visible = false
|
||||
$Flower.visible = false
|
||||
$Voron.visible = false
|
||||
$VoronEye.visible = false
|
||||
$WindowLight.visible = false
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи закрыты/windOff.webp")
|
||||
GallerySingleton.AddBackground("Hospital_Loser");
|
||||
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Hospital.ogg"
|
||||
if Dialogic.get_variable("HospitalSFX") == "1":
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
elif Dialogic.get_variable("HospitalSFX") == "2":
|
||||
get_tree().root.get_node("Root").SetSFXforBGM("res://resources/audio/sfx/DanaThemeAudio.ogg")
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_dialogic_listener")
|
||||
|
||||
func _dialogic_listener(string):
|
||||
match string:
|
||||
"HospitalSFX":
|
||||
var sfxPath = "res://resources/audio/sfx/Hospital.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
Dialogic.set_variable("HospitalSFX", "1")
|
||||
"StopSFX":
|
||||
get_tree().root.get_node("Root").StopSFX()
|
||||
Dialogic.set_variable("HospitalSFX", "0")
|
||||
"Camera0":
|
||||
Dialogic.set_variable("cameraPosition", "0")
|
||||
$Tween.remove_all()
|
||||
$Tween.interpolate_property(self, "scale", self.scale, scale0Position, zoomingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, camera0Position, zoomingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"Camera1":
|
||||
Dialogic.set_variable("cameraPosition", "1")
|
||||
$Tween.remove_all()
|
||||
$Tween.interpolate_property(self, "scale", self.scale, scale1Position, zoomingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, camera1Position, zoomingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"Camera2":
|
||||
Dialogic.set_variable("cameraPosition", "2")
|
||||
$Tween.remove_all()
|
||||
$Tween.interpolate_property(self, "scale", self.scale, scale2Position, zoomingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, camera2Position, zoomingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"DanaSFX":
|
||||
var sfxPath = "res://resources/audio/sfx/DanaThemeAudio.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
Dialogic.set_variable("HospitalSFX", "2")
|
||||
|
||||
func blur_change(value):
|
||||
$ForScale / Polygon2D.material.set_shader_param("lod", value)
|
||||
|
||||
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
var amount = 0;
|
||||
var only = "";
|
||||
var names = ["Hospital_Pink", "Hospital_Blue", "Hospital_Green", "Hospital_Purple", "Hospital_Orange", "Hospital_Black", "Hospital_Loser"];
|
||||
var res = [];
|
||||
|
||||
for i in names:
|
||||
var unlocked = GallerySingleton.HaveBackground(i);
|
||||
if unlocked:
|
||||
match i:
|
||||
"Hospital_Pink":
|
||||
res.push_back("ui_name_pink");
|
||||
"Hospital_Blue":
|
||||
res.push_back("ui_name_blue_f");
|
||||
"Hospital_Green":
|
||||
res.push_back("ui_name_green");
|
||||
"Hospital_Purple":
|
||||
res.push_back("ui_name_purple");
|
||||
"Hospital_Orange":
|
||||
res.push_back("ui_name_orange");
|
||||
"Hospital_Black":
|
||||
res.push_back("ui_name_black");
|
||||
"Hospital_Loser":
|
||||
res.push_back("ui_name_loser");
|
||||
amount += 1;
|
||||
only = i;
|
||||
|
||||
if amount == 1:
|
||||
match only:
|
||||
"Hospital_Pink":
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/pinkflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/pinkeye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/pinkthing.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/light3.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/windOn.webp")
|
||||
"Hospital_Blue":
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/blueflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/blueeye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/bluething.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/light3.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/windOn.webp")
|
||||
"Hospital_Green":
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/greenflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/greeneye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/greenthing.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/light2.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/windOnOff.webp")
|
||||
"Hospital_Purple":
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/violetflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/violeteye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/violetthing.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/light2.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/windOnOff.webp")
|
||||
"Hospital_Orange":
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/orangeflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/orangeeye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/orangething.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/light3.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/windOn.webp")
|
||||
"Hospital_Black":
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/blackflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/blackeye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/blackthing.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/light2.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/windOnOff.webp")
|
||||
_:
|
||||
$Item.visible = false
|
||||
$Flower.visible = false
|
||||
$Voron.visible = false
|
||||
$VoronEye.visible = false
|
||||
$WindowLight.visible = false
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи закрыты/windOff.webp")
|
||||
|
||||
return [];
|
||||
else :
|
||||
var firstCharacter = tr(res[0]);
|
||||
SetSettings(firstCharacter)
|
||||
return res;
|
||||
|
||||
func SetSettings(setting):
|
||||
$Item.visible = true
|
||||
$Flower.visible = true
|
||||
$Voron.visible = true
|
||||
$VoronEye.visible = true
|
||||
$WindowLight.visible = true
|
||||
|
||||
if setting == tr("ui_name_pink"):
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/pinkflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/pinkeye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/pinkthing.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/light3.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/windOn.webp")
|
||||
elif setting == tr("ui_name_blue_f"):
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/blueflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/blueeye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/bluething.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/light3.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/windOn.webp")
|
||||
elif setting == tr("ui_name_green"):
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/greenflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/greeneye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/greenthing.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/light2.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/windOnOff.webp")
|
||||
elif setting == tr("ui_name_purple"):
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/violetflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/violeteye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/violetthing.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/light2.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/windOnOff.webp")
|
||||
elif setting == tr("ui_name_orange"):
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/orangeflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/orangeeye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/orangething.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/light3.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи открытые/windOn.webp")
|
||||
elif setting == tr("ui_name_black"):
|
||||
$Flower.texture = load("res://resources/graphics/backgrounds/hospital/цветы/blackflw.webp")
|
||||
$VoronEye.texture = load("res://resources/graphics/backgrounds/hospital/ворон/blackeye.webp")
|
||||
$Item.texture = load("res://resources/graphics/backgrounds/hospital/предметы/blackthing.webp")
|
||||
$WindowLight.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/light2.webp")
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи полуоткрытые/windOnOff.webp")
|
||||
else :
|
||||
$Item.visible = false
|
||||
$Flower.visible = false
|
||||
$Voron.visible = false
|
||||
$VoronEye.visible = false
|
||||
$WindowLight.visible = false
|
||||
$Window.texture = load("res://resources/graphics/backgrounds/hospital/жалюзи закрыты/windOff.webp")
|
20
scripts/backround_scenes_scripts/Kamin.gd
Normal file
20
scripts/backround_scenes_scripts/Kamin.gd
Normal file
|
@ -0,0 +1,20 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
$Cat.Init(2, 6);
|
||||
$Cat.position = Vector2(1365, 620);
|
||||
$Cat.Scale(0.55);
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/zvuk-kamina.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
GallerySingleton.AddBackground("Kamin");
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
$Cat.visible = false;
|
||||
return [];
|
11
scripts/backround_scenes_scripts/Kofta.gd
Normal file
11
scripts/backround_scenes_scripts/Kofta.gd
Normal file
|
@ -0,0 +1,11 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Kofta");
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
return [];
|
69
scripts/backround_scenes_scripts/Linda_sex.gd
Normal file
69
scripts/backround_scenes_scripts/Linda_sex.gd
Normal file
|
@ -0,0 +1,69 @@
|
|||
extends Node2D
|
||||
|
||||
const fadeTime = 1.4
|
||||
const cameraPosition = Vector2(0, 0)
|
||||
const cameraZoom = Vector2(1.5, 1.5)
|
||||
const cameraTime = 2.0
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Linda_sex");
|
||||
|
||||
if Dialogic.get_variable("SexSpriteNumber") == "1":
|
||||
self.scale = cameraZoom
|
||||
elif Dialogic.get_variable("SexSpriteNumber") == "2":
|
||||
$Sprite1.visible = false
|
||||
elif Dialogic.get_variable("SexSpriteNumber") == "3":
|
||||
$Sprite1.visible = false
|
||||
self.position = cameraPosition
|
||||
self.scale = cameraZoom
|
||||
elif Dialogic.get_variable("SexSpriteNumber") == "4":
|
||||
self.scale = Vector2(1.0, 1.0)
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_slideswitch_listener")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func _slideswitch_listener(string):
|
||||
match string:
|
||||
"sprite2":
|
||||
Dialogic.set_variable("SexSpriteNumber", 2)
|
||||
var tween = $"Tween"
|
||||
tween.interpolate_method(self, "Sprite1Interpolate", 1, 0, fadeTime, Tween.TRANS_LINEAR, 0)
|
||||
tween.start()
|
||||
"camera_zoom":
|
||||
Dialogic.set_variable("SexSpriteNumber", 3)
|
||||
var tween = $"Tween"
|
||||
|
||||
tween.interpolate_property(self, "scale", self.scale, cameraZoom, cameraTime, Tween.TRANS_LINEAR, 0)
|
||||
tween.start()
|
||||
"camera_zoom_out":
|
||||
Dialogic.set_variable("SexSpriteNumber", 4)
|
||||
var tween = $"Tween"
|
||||
|
||||
tween.interpolate_property(self, "scale", self.scale, Vector2(1.0, 1.0), cameraTime, Tween.TRANS_LINEAR, 0)
|
||||
tween.start()
|
||||
|
||||
func Sprite1Interpolate(value):
|
||||
$Sprite1.self_modulate.a = value
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
return ["ui_gallery_fall_1", "ui_gallery_fall_2"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_gallery_fall_1"):
|
||||
$Sprite.visible = false;
|
||||
$Sprite1.visible = true;
|
||||
elif setting == tr("ui_gallery_fall_2"):
|
||||
$Sprite.visible = true;
|
||||
$Sprite1.visible = false;
|
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;
|
83
scripts/backround_scenes_scripts/Mayak_Back.gd
Normal file
83
scripts/backround_scenes_scripts/Mayak_Back.gd
Normal file
|
@ -0,0 +1,83 @@
|
|||
extends Node2D
|
||||
|
||||
const camera1 = Vector2( - 500.0, 0.0)
|
||||
const scale1 = Vector2(1.3, 1.3)
|
||||
const camera2 = Vector2( - 700.0, 0.0)
|
||||
const scale2 = Vector2(1.7, 1.7)
|
||||
const zoomingTime1 = 2.0
|
||||
const zoomingTime2 = 2.0
|
||||
|
||||
|
||||
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_Back")
|
||||
else :
|
||||
$day.visible = false
|
||||
$night.visible = true
|
||||
|
||||
var sfxPath = "";
|
||||
var value = Dialogic.get_variable("TimelineSave");
|
||||
if value == "Timeline_120_lighthouse" or value == "timeline_140_lighthouse":
|
||||
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(3, player);
|
||||
|
||||
GallerySingleton.AddBackground("Mayak_Back_n")
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_dialogic_listener")
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
$day.visible = true
|
||||
$day / rain.visible = false;
|
||||
$night.visible = false;
|
||||
|
||||
if not GallerySingleton.HaveBackground("Mayak_Back_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;
|
||||
|
||||
func _dialogic_listener(string):
|
||||
match string:
|
||||
"zoom1":
|
||||
$Tween.remove_all()
|
||||
$Tween.interpolate_property(self, "scale", self.scale, scale1, zoomingTime1, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, camera1, zoomingTime1, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"zoom2":
|
||||
$Tween.remove_all()
|
||||
$Tween.interpolate_property(self, "scale", self.scale, scale2, zoomingTime2, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, camera2, zoomingTime2, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
343
scripts/backround_scenes_scripts/Panorama.gd
Normal file
343
scripts/backround_scenes_scripts/Panorama.gd
Normal file
|
@ -0,0 +1,343 @@
|
|||
extends Node2D
|
||||
|
||||
const fadingTime = 0.5
|
||||
|
||||
onready var arrowCursor = preload("res://resources/cursors/arrow2.webp");
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddBackground("Panorama")
|
||||
|
||||
if Dialogic.get_variable("CandlesOn") == "1":
|
||||
$Candles.visible = true
|
||||
else :
|
||||
$Candles.visible = false
|
||||
|
||||
if Dialogic.get_variable("LightsOn") == "1":
|
||||
$Candles / Day.visible = true
|
||||
$Candles / Night.visible = false
|
||||
else :
|
||||
$Candles / Day.visible = false
|
||||
$Candles / Night.visible = true
|
||||
$Background.texture = load("res://resources/graphics/backgrounds/panorama/Night/combined.webp");
|
||||
|
||||
var chars = ["grayPanorama", "blackPanorama", "redPanorama", "greenPanorama", "pinkPanorama", "blue_mPanorama", "whitePanorama", "purplePanorama"]
|
||||
for i in chars:
|
||||
if Dialogic.get_variable(i) == "1":
|
||||
var string = i.replace("Panorama", "")
|
||||
AddChar(true, "add_" + string)
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_lights_listener")
|
||||
|
||||
var panoPosition = int(Dialogic.get_variable("PanoramaPosition"))
|
||||
position.x = panoPosition;
|
||||
|
||||
|
||||
if get_tree().root.get_node("Root/AlternativeChoices").get_child_count() != 0:
|
||||
var alt = get_tree().root.get_node("Root/AlternativeChoices").get_child(0);
|
||||
alt.get_node("SpriteButtons").position.x = panoPosition;
|
||||
alt.get_node("Labels").position.x = panoPosition;
|
||||
|
||||
func _lights_listener(string):
|
||||
match string:
|
||||
"lights_on":
|
||||
Dialogic.set_variable("LightsOn", 1)
|
||||
$Background.texture = load("res://resources/graphics/backgrounds/panorama/Day/combined.webp");
|
||||
"lights_off":
|
||||
Dialogic.set_variable("LightsOn", 0)
|
||||
$Background.texture = load("res://resources/graphics/backgrounds/panorama/Night/combined.webp");
|
||||
"add_white":
|
||||
AddChar(s("Is_White_Dead"), string)
|
||||
"remove_white":
|
||||
RemoveChar(string)
|
||||
"add_black":
|
||||
AddChar(s("Is_Black_Dead"), string)
|
||||
"remove_black":
|
||||
RemoveChar(string)
|
||||
"add_blue_m":
|
||||
AddChar(s("Is_Blue_M_Dead"), string)
|
||||
"remove_blue_m":
|
||||
RemoveChar(string)
|
||||
"add_gray":
|
||||
AddChar(s("Is_Gray_Dead"), string)
|
||||
"remove_gray":
|
||||
RemoveChar(string)
|
||||
"add_green":
|
||||
AddChar(s("Is_Green_Dead"), string)
|
||||
"remove_green":
|
||||
RemoveChar(string)
|
||||
"add_pink":
|
||||
AddChar(s("Is_Pink_Dead"), string)
|
||||
"remove_pink":
|
||||
RemoveChar(string)
|
||||
"add_purple":
|
||||
AddChar(s("Is_Purple_Dead"), string)
|
||||
"remove_purple":
|
||||
RemoveChar(string)
|
||||
"add_red":
|
||||
AddChar(s("Is_Red_Dead"), string)
|
||||
"remove_red":
|
||||
RemoveChar(string)
|
||||
"candles_on":
|
||||
$Candles.modulate = Color(1, 1, 1, 0)
|
||||
$Candles.visible = true
|
||||
Dialogic.set_variable("CandlesOn", 1)
|
||||
$Tween.interpolate_property($Candles, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), fadingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"candles_off":
|
||||
$TweenOut.interpolate_property($Candles, "modulate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), fadingTime, Tween.TRANS_LINEAR, 0)
|
||||
$TweenOut.start()
|
||||
Dialogic.set_variable("CandlesOn", 0)
|
||||
"add_all120":
|
||||
AddChar(s("Is_Red_Dead"), "add_red")
|
||||
AddChar(s("Is_White_Dead"), "add_white")
|
||||
AddChar(s("Is_Purple_Dead"), "add_purple")
|
||||
AddChar(s("Is_Blue_M_Dead"), "add_blue_m")
|
||||
AddChar(s("Is_Pink_Dead"), "add_pink")
|
||||
AddChar(s("Is_Green_Dead"), "add_green")
|
||||
AddChar(s("Is_Black_Dead"), "add_black")
|
||||
AddChar(s("Is_Gray_Dead"), "add_gray")
|
||||
"add_all140":
|
||||
AddChar(s("Is_Red_Dead"), "add_red")
|
||||
AddChar(s("Is_White_Dead"), "add_white")
|
||||
"remove_all120":
|
||||
var chars = []
|
||||
if Dialogic.get_variable("redPanorama") == "1":
|
||||
chars.push_back("red")
|
||||
call_deferred("deferredDialogic", "redPanorama", 0)
|
||||
if Dialogic.get_variable("whitePanorama") == "1":
|
||||
chars.push_back("white")
|
||||
call_deferred("deferredDialogic", "whitePanorama", 0)
|
||||
if Dialogic.get_variable("purplePanorama") == "1":
|
||||
chars.push_back("purple")
|
||||
call_deferred("deferredDialogic", "purplePanorama", 0)
|
||||
if Dialogic.get_variable("blue_mPanorama") == "1":
|
||||
chars.push_back("blue_m")
|
||||
call_deferred("deferredDialogic", "blue_mPanorama", 0)
|
||||
if Dialogic.get_variable("pinkPanorama") == "1":
|
||||
chars.push_back("pink")
|
||||
call_deferred("deferredDialogic", "pinkPanorama", 0)
|
||||
if Dialogic.get_variable("greenPanorama") == "1":
|
||||
chars.push_back("green")
|
||||
call_deferred("deferredDialogic", "greenPanorama", 0)
|
||||
if Dialogic.get_variable("blackPanorama") == "1":
|
||||
chars.push_back("black")
|
||||
call_deferred("deferredDialogic", "blackPanorama", 0)
|
||||
if Dialogic.get_variable("grayPanorama") == "1":
|
||||
chars.push_back("gray")
|
||||
call_deferred("deferredDialogic", "grayPanorama", 0)
|
||||
for i in chars:
|
||||
$Timer.set_wait_time(0.05)
|
||||
$Timer.set_one_shot(true)
|
||||
$Timer.start()
|
||||
yield ($Timer, "timeout")
|
||||
$TweenOut.interpolate_property($removable.get_node(i), "modulate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), fadingTime, Tween.TRANS_LINEAR, 0)
|
||||
$TweenOut.start()
|
||||
"remove_all140":
|
||||
var chars = []
|
||||
if Dialogic.get_variable("redPanorama") == "1":
|
||||
chars.push_back("red")
|
||||
call_deferred("deferredDialogic", "redPanorama", 0)
|
||||
if Dialogic.get_variable("whitePanorama") == "1":
|
||||
chars.push_back("white")
|
||||
call_deferred("deferredDialogic", "whitePanorama", 0)
|
||||
for i in chars:
|
||||
$Timer.set_wait_time(0.1)
|
||||
$Timer.set_one_shot(true)
|
||||
$Timer.start()
|
||||
yield ($Timer, "timeout")
|
||||
$TweenOut.interpolate_property($removable.get_node(i), "modulate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), fadingTime, Tween.TRANS_LINEAR, 0)
|
||||
$TweenOut.start()
|
||||
"invisible_all":
|
||||
for i in $removable.get_children():
|
||||
i.visible = false
|
||||
|
||||
func deferredDialogic(string, value):
|
||||
Dialogic.set_variable(string, value)
|
||||
|
||||
|
||||
func s(variable:String)->bool:
|
||||
return Dialogic.get_variable(variable) == "0";
|
||||
|
||||
func AddChar(isAlive:bool, string:String):
|
||||
if not isAlive:
|
||||
return
|
||||
var charNode
|
||||
var string2 = string.replace("add_", "")
|
||||
var stringForDialogic = string2 + "Panorama"
|
||||
deferredDialogic(stringForDialogic, 1)
|
||||
charNode = $removable.get_node(string2)
|
||||
charNode.modulate = Color(1, 1, 1, 0)
|
||||
charNode.visible = true
|
||||
$Tween.interpolate_property(charNode, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), fadingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
|
||||
func RemoveChar(string):
|
||||
var charNode
|
||||
var string2 = string.replace("remove_", "")
|
||||
var stringForDialogic = string2 + "Panorama"
|
||||
if Dialogic.get_variable(stringForDialogic) == "1":
|
||||
charNode = $removable.get_node(string2)
|
||||
$TweenOut.interpolate_property(charNode, "modulate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), fadingTime, Tween.TRANS_LINEAR, 0)
|
||||
$TweenOut.start()
|
||||
|
||||
func _on_TweenOut_tween_completed(object, _key):
|
||||
object.visible = false
|
||||
|
||||
|
||||
|
||||
onready var leftFire:AudioStreamPlayer = $LeftFireEffect;
|
||||
onready var rightRain:AudioStreamPlayer = $RightRainEffect
|
||||
|
||||
func UpdateContainerSound(x:int):
|
||||
|
||||
|
||||
leftFire.volume_db = LeftVolume(x);
|
||||
rightRain.volume_db = RightVolume(x);
|
||||
|
||||
func LeftVolume(x:int)->float:
|
||||
|
||||
return 0.013 * x - 13;
|
||||
|
||||
func RightVolume(x:int)->float:
|
||||
|
||||
return - 0.0196 * x - 36;
|
||||
|
||||
|
||||
func _exit_tree():
|
||||
Input.set_custom_mouse_cursor(arrowCursor)
|
||||
Dialogic.set_variable("PanoramaPosition", "-460");
|
||||
|
||||
|
||||
|
||||
|
||||
var isGallery:bool = false;
|
||||
|
||||
func InitForGallery()->Array:
|
||||
$Background.scale = Vector2(0.5, 0.5)
|
||||
$Candles.scale = Vector2(0.5, 0.5)
|
||||
$Clock.scale = Vector2(0.5, 0.5)
|
||||
$removable.scale = Vector2(0.5, 0.5)
|
||||
|
||||
FUCKVisibile();
|
||||
|
||||
isGallery = true;
|
||||
$MovingControls.visible = true;
|
||||
|
||||
return ["ui_gallery_light", "ui_gallery_candles", "ui_gallery_people"]
|
||||
|
||||
var galleryIsDay = true;
|
||||
|
||||
func SetToggleSettings(button):
|
||||
var text = button.text;
|
||||
var state = button.pressed;
|
||||
|
||||
if text == tr("ui_gallery_light"):
|
||||
if state == true:
|
||||
$Background.texture = load("res://resources/graphics/backgrounds/panorama/Night/combined.webp");
|
||||
galleryIsDay = false;
|
||||
if $Candles / Day.visible:
|
||||
$Candles / Night.visible = true;
|
||||
$Candles / Day.visible = false;
|
||||
else :
|
||||
$Background.texture = load("res://resources/graphics/backgrounds/panorama/Day/combined.webp");
|
||||
galleryIsDay = true;
|
||||
if $Candles / Night.visible:
|
||||
$Candles / Night.visible = false;
|
||||
$Candles / Day.visible = true;
|
||||
elif text == tr("ui_gallery_candles"):
|
||||
if state == true:
|
||||
if galleryIsDay:
|
||||
$Candles / Day.visible = true;
|
||||
$Candles / Night.visible = false;
|
||||
$Candles / Lights.visible = true;
|
||||
else :
|
||||
$Candles / Day.visible = false;
|
||||
$Candles / Night.visible = true;
|
||||
$Candles / Lights.visible = true;
|
||||
else :
|
||||
$Candles / Day.visible = false;
|
||||
$Candles / Night.visible = false;
|
||||
$Candles / Lights.visible = false;
|
||||
|
||||
elif text == tr("ui_gallery_people"):
|
||||
for i in $removable.get_children():
|
||||
i.visible = state;
|
||||
|
||||
func FUCKVisibile():
|
||||
var timer = Timer.new();
|
||||
add_child(timer);
|
||||
timer.set_wait_time(0.1);
|
||||
timer.set_one_shot(true);
|
||||
timer.start();
|
||||
timer.connect("timeout", self, "FUCKFUCK", [timer]);
|
||||
|
||||
func FUCKFUCK(timer):
|
||||
$Candles / Lights.call_deferred("set_visible", false)
|
||||
$Candles.call_deferred("set_visible", true);
|
||||
$Candles / Day.call_deferred("set_visible", false);
|
||||
$Candles / Night.call_deferred("set_visible", false);
|
||||
timer.disconnect("timeout", self, "FUCKFUCK")
|
||||
remove_child(timer);
|
||||
|
||||
var cursorRight = preload("res://resources/cursors/man_right.webp")
|
||||
var cursorLeft = preload("res://resources/cursors/man_left.webp")
|
||||
var movingLeft = false;
|
||||
var movingRight = false;
|
||||
const movingSpeed = 310;
|
||||
const edgePosition = - 920;
|
||||
|
||||
func _on_LeftMove_mouse_entered():
|
||||
if position.x < 0:
|
||||
Input.set_custom_mouse_cursor(cursorLeft)
|
||||
movingLeft = true
|
||||
|
||||
func _on_LeftMove_mouse_exited():
|
||||
Input.set_custom_mouse_cursor(arrowCursor)
|
||||
movingLeft = false
|
||||
|
||||
func _on_RightMove_mouse_entered():
|
||||
if position.x > edgePosition:
|
||||
Input.set_custom_mouse_cursor(cursorRight, 0, Vector2(50, 0))
|
||||
movingRight = true
|
||||
|
||||
func _on_RightMove_mouse_exited():
|
||||
Input.set_custom_mouse_cursor(arrowCursor)
|
||||
movingRight = false
|
||||
|
||||
func _process(delta):
|
||||
if not isGallery:
|
||||
return ;
|
||||
|
||||
if position.x == 0:
|
||||
if $MovingControls / LeftMove.visible:
|
||||
$MovingControls / LeftMove.visible = false;
|
||||
_on_LeftMove_mouse_exited();
|
||||
elif position.x == edgePosition:
|
||||
if $MovingControls / RightMove.visible:
|
||||
$MovingControls / RightMove.visible = false;
|
||||
_on_RightMove_mouse_exited();
|
||||
else :
|
||||
if not $MovingControls / LeftMove.visible:
|
||||
$MovingControls / LeftMove.visible = true
|
||||
if not $MovingControls / RightMove.visible:
|
||||
$MovingControls / RightMove.visible = true;
|
||||
|
||||
if movingLeft:
|
||||
var value = delta * movingSpeed;
|
||||
position.x += value
|
||||
$MovingControls.position.x -= value
|
||||
if position.x > 0:
|
||||
position.x = 0
|
||||
movingLeft = false
|
||||
|
||||
elif movingRight:
|
||||
var value = delta * movingSpeed;
|
||||
position.x -= value
|
||||
$MovingControls.position.x += value
|
||||
if position.x < edgePosition:
|
||||
position.x = edgePosition
|
||||
movingRight = false
|
117
scripts/backround_scenes_scripts/Pistol.gd
Normal file
117
scripts/backround_scenes_scripts/Pistol.gd
Normal file
|
@ -0,0 +1,117 @@
|
|||
extends Node2D
|
||||
|
||||
var isGlock:bool
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Pistol");
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Rain Loop.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
if int(Dialogic.get_variable("Is_White_Dead")) == 0:
|
||||
$white.visible = true
|
||||
isGlock = true
|
||||
GallerySingleton.AddImage("Pistol_White");
|
||||
if int(Dialogic.get_variable("Is_Red_Dead")) == 0:
|
||||
$red.visible = true
|
||||
isGlock = false
|
||||
GallerySingleton.AddImage("Pistol_Red");
|
||||
|
||||
if Dialogic.get_variable("Killer") == "Pink":
|
||||
if int(Dialogic.get_variable("NoGirl")) == 0:
|
||||
$pink.visible = true
|
||||
if isGlock:
|
||||
$pink / glock.visible = true
|
||||
else :
|
||||
$pink / beretta.visible = true
|
||||
|
||||
GallerySingleton.AddImage("Pistol_Pink");
|
||||
if Dialogic.get_variable("Killer") == "Blue":
|
||||
if int(Dialogic.get_variable("NoGirl")) == 0:
|
||||
$blue.visible = true
|
||||
if isGlock:
|
||||
$pink / glock.visible = true
|
||||
else :
|
||||
$pink / beretta.visible = true
|
||||
|
||||
GallerySingleton.AddImage("Pistol_Blue");
|
||||
|
||||
var isPink;
|
||||
var isWhite;
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
var res = [];
|
||||
|
||||
var glock = GallerySingleton.HaveImage("Pistol_White")
|
||||
var beretta = GallerySingleton.HaveImage("Pistol_Red")
|
||||
|
||||
if glock and beretta:
|
||||
isGlock = true;
|
||||
isWhite = true;
|
||||
res.push_back("ui_gallery_pistol");
|
||||
res.push_back("ui_gallery_victim");
|
||||
elif glock and not beretta:
|
||||
isGlock = true;
|
||||
isWhite = true;
|
||||
else :
|
||||
isGlock = false;
|
||||
isWhite = false;
|
||||
|
||||
var pink = GallerySingleton.HaveImage("Pistol_Pink")
|
||||
var blue = GallerySingleton.HaveImage("Pistol_Blue")
|
||||
|
||||
if pink and blue:
|
||||
isPink = true;
|
||||
res.push_back("ui_gallery_girl");
|
||||
elif pink and not blue:
|
||||
isPink = true;
|
||||
else :
|
||||
isPink = false;
|
||||
|
||||
SetScene()
|
||||
|
||||
return res;
|
||||
|
||||
func SetScene():
|
||||
if isWhite:
|
||||
$white.visible = true;
|
||||
$red.visible = false;
|
||||
else :
|
||||
$white.visible = false;
|
||||
$red.visible = true;
|
||||
|
||||
if isPink:
|
||||
$pink.visible = true;
|
||||
$blue.visible = false;
|
||||
else :
|
||||
$pink.visible = false;
|
||||
$blue.visible = true;
|
||||
|
||||
if isGlock:
|
||||
$pink / glock.visible = true;
|
||||
$blue / glock.visible = true;
|
||||
$pink / beretta.visible = false;
|
||||
$blue / beretta.visible = false;
|
||||
else :
|
||||
$pink / glock.visible = false;
|
||||
$blue / glock.visible = false;
|
||||
$pink / beretta.visible = true;
|
||||
$blue / beretta.visible = true;
|
||||
|
||||
func SetToggleSettings(button):
|
||||
var text = button.text;
|
||||
var state = button.pressed;
|
||||
if text == tr("ui_gallery_pistol"):
|
||||
isGlock = not state;
|
||||
if text == tr("ui_gallery_victim"):
|
||||
isWhite = not state;
|
||||
if text == tr("ui_gallery_girl"):
|
||||
isPink = not state;
|
||||
|
||||
SetScene()
|
||||
|
127
scripts/backround_scenes_scripts/Podval.gd
Normal file
127
scripts/backround_scenes_scripts/Podval.gd
Normal file
|
@ -0,0 +1,127 @@
|
|||
extends Node2D
|
||||
|
||||
var isWindowOpen:bool
|
||||
var isLightOn:bool
|
||||
var isWaterOn:bool
|
||||
var path:String
|
||||
|
||||
var sfxStarted:bool = false;
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddBackground("Podval")
|
||||
|
||||
if Dialogic.get_variable("ItIsDay") == "true":
|
||||
$ForScale / Polygon2D.modulate = Color(0.48, 0.48, 0.48)
|
||||
else :
|
||||
$ForScale / Polygon2D.modulate = Color(0.08, 0.08, 0.08)
|
||||
$ForScale / Rain.visible = true
|
||||
|
||||
if Dialogic.get_variable("TimelineSave") == "Timeline_140_main":
|
||||
var sfxPath = "res://resources/audio/sfx/rain_podval.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
sfxStarted = true;
|
||||
|
||||
$Cat.Init(2, 3);
|
||||
$Cat.position = Vector2(1580, 310);
|
||||
$Cat.Scale(0.35);
|
||||
|
||||
if int(Dialogic.get_variable("LightsOn")) == 1:
|
||||
isLightOn = true
|
||||
else :
|
||||
isLightOn = false
|
||||
if int(Dialogic.get_variable("WindowOpen")) == 1:
|
||||
isWindowOpen = true
|
||||
else :
|
||||
isWindowOpen = false
|
||||
if int(Dialogic.get_variable("WaterOn")) == 1:
|
||||
isWaterOn = true
|
||||
else :
|
||||
isWaterOn = false
|
||||
SetSceneState()
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_podval_listener")
|
||||
|
||||
func SetSceneState():
|
||||
if ( not isLightOn and isWaterOn and not isWindowOpen):
|
||||
path = "res://resources/graphics/backgrounds/podval/dark_water_closed.webp"
|
||||
elif ( not isLightOn and isWaterOn and isWindowOpen):
|
||||
path = "res://resources/graphics/backgrounds/podval/dark_water_open.webp"
|
||||
elif ( not isLightOn and not isWaterOn and not isWindowOpen):
|
||||
path = "res://resources/graphics/backgrounds/podval/dark_nowater_closed.webp"
|
||||
elif ( not isLightOn and not isWaterOn and isWindowOpen):
|
||||
path = "res://resources/graphics/backgrounds/podval/dark_nowater_open.webp"
|
||||
elif (isLightOn and not isWaterOn and not isWindowOpen):
|
||||
path = "res://resources/graphics/backgrounds/podval/light_nowater_closed.webp"
|
||||
elif (isLightOn and isWaterOn and not isWindowOpen):
|
||||
path = "res://resources/graphics/backgrounds/podval/light_water_closed.webp"
|
||||
elif (isLightOn and not isWaterOn and isWindowOpen):
|
||||
path = "res://resources/graphics/backgrounds/podval/light_nowater_open.webp"
|
||||
elif (isLightOn and isWaterOn and isWindowOpen):
|
||||
path = "res://resources/graphics/backgrounds/podval/light_water_open.webp"
|
||||
|
||||
$Sprite.texture = load(path)
|
||||
|
||||
if isWindowOpen:
|
||||
$Sprite / PowerPanel.visible = true
|
||||
if isLightOn:
|
||||
$Sprite / PowerPanel.texture = load("res://resources/graphics/backgrounds/podval/elec_light.webp")
|
||||
else :
|
||||
$Sprite / PowerPanel.texture = load("res://resources/graphics/backgrounds/podval/elec_dark.webp")
|
||||
|
||||
func _podval_listener(string):
|
||||
match string:
|
||||
"lights_on":
|
||||
Dialogic.set_variable("LightsOn", 1)
|
||||
isLightOn = true
|
||||
"lights_off":
|
||||
Dialogic.set_variable("LightsOn", 0)
|
||||
"water_on":
|
||||
Dialogic.set_variable("WaterOn", 1)
|
||||
isWaterOn = true
|
||||
"water_off":
|
||||
Dialogic.set_variable("WaterOn", 0)
|
||||
isWaterOn = false
|
||||
"window_open":
|
||||
Dialogic.set_variable("WindowOpen", 1)
|
||||
isWindowOpen = true
|
||||
"window_close":
|
||||
Dialogic.set_variable("WindowOpen", 0)
|
||||
isWindowOpen = false
|
||||
"add_gray":
|
||||
$removable / Gray.visible = Dialogic.get_variable("Is_Gray_Dead") == "0";
|
||||
"remove_gray":
|
||||
$removable / Gray.visible = false;
|
||||
SetSceneState()
|
||||
|
||||
func _exit_tree():
|
||||
if sfxStarted:
|
||||
get_tree().root.get_node("Root").StopSFX();
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
isLightOn = false;
|
||||
isWaterOn = false;
|
||||
isWindowOpen = false;
|
||||
SetSceneState();
|
||||
$Cat.visible = false;
|
||||
|
||||
return ["ui_gallery_light", "ui_gallery_water", "ui_gallery_window"];
|
||||
|
||||
func SetToggleSettings(button):
|
||||
var text = button.text;
|
||||
var state = button.pressed;
|
||||
|
||||
if text == tr("ui_gallery_light"):
|
||||
isLightOn = state
|
||||
elif text == tr("ui_gallery_water"):
|
||||
isWaterOn = state;
|
||||
elif text == tr("ui_gallery_window"):
|
||||
isWindowOpen = state;
|
||||
|
||||
SetSceneState();
|
||||
$Cat.visible = false;
|
57
scripts/backround_scenes_scripts/PoliceStation.gd
Normal file
57
scripts/backround_scenes_scripts/PoliceStation.gd
Normal file
|
@ -0,0 +1,57 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
CheckForParkingEpilog();
|
||||
|
||||
GallerySingleton.AddBackground("PoliceStation");
|
||||
|
||||
ShowImages();
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/ventilator_potolok.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
func CheckForParkingEpilog():
|
||||
var chosen = Dialogic.get_variable("Chosen_Girl");
|
||||
if chosen == "Black" or chosen == "Green" or chosen == "Purple":
|
||||
Dialogic.set_variable("Parking", "1");
|
||||
|
||||
func ShowImages():
|
||||
var dict = ProgressAchievementsSingleton.CreateEpilogMinigameImages();
|
||||
|
||||
for i in dict:
|
||||
var eName = i["name"].to_lower();
|
||||
var node:Sprite = get_node(str("removables/", eName));
|
||||
node.visible = true;
|
||||
if i.has("location"):
|
||||
node.position = i["location"];
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
for i in $removables.get_children():
|
||||
i.visible = true;
|
||||
|
||||
FUCKTexture($Node2D / Viewport / police3d / Position3D / wing4);
|
||||
|
||||
return [];
|
||||
|
||||
func SetSettings(button):
|
||||
pass
|
||||
|
||||
func FUCKTexture(control):
|
||||
var timer = Timer.new();
|
||||
add_child(timer);
|
||||
control.call_deferred("set_offset", Vector2(0, - 541));
|
||||
timer.set_wait_time(0.1);
|
||||
timer.set_one_shot(true);
|
||||
timer.start();
|
||||
timer.connect("timeout", self, "FUCKFUCK", [control, timer]);
|
||||
|
||||
func FUCKFUCK(control, timer):
|
||||
control.call_deferred("set_offset", Vector2(0, - 540));
|
||||
|
||||
timer.disconnect("timeout", self, "FUCKFUCK")
|
||||
remove_child(timer);
|
104
scripts/backround_scenes_scripts/Pristan.gd
Normal file
104
scripts/backround_scenes_scripts/Pristan.gd
Normal file
|
@ -0,0 +1,104 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
InitWater();
|
||||
if Dialogic.get_variable("ItIsDay") == "true":
|
||||
$Day.visible = true;
|
||||
$Night.visible = false;
|
||||
|
||||
if Dialogic.get_variable("PristanCat") == "1":
|
||||
$Cat.Init(99, 4);
|
||||
$Cat.position = Vector2(760, 690);
|
||||
$Cat.visible = true;
|
||||
else :
|
||||
$Cat.Init(99, 10);
|
||||
$Cat.position = Vector2(760, 690);
|
||||
$Cat.visible = true;
|
||||
|
||||
if Dialogic.get_variable("TwinsNPC") == "fish":
|
||||
$Day / Fisher.visible = true;
|
||||
|
||||
$rain.visible = false
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Mayak_day.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
GallerySingleton.AddBackground("Pristan");
|
||||
else :
|
||||
$Day.visible = false;
|
||||
$Night.visible = true;
|
||||
$rain.visible = true
|
||||
|
||||
|
||||
var 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");
|
||||
$Lightning.Init(4, player);
|
||||
$Lightning.SetPosition(Vector2( - 400, 0), Vector2(0.25, 0.25));
|
||||
|
||||
$Lightning2.Init(3, player);
|
||||
$Lightning2.SetPosition(Vector2(700, 0), Vector2(0.25, 0.25));
|
||||
|
||||
GallerySingleton.AddBackground("Pristan_n")
|
||||
|
||||
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:
|
||||
"add_cat":
|
||||
Dialogic.set_variable("PristanCat", "1");
|
||||
$Cat.Init(99, 4);
|
||||
$Cat.position = Vector2(760, 690);
|
||||
$Cat.visible = true;
|
||||
|
||||
func InitWater():
|
||||
SceneLoader.connect("on_scene_loaded", self, "WaterLoaded");
|
||||
if Dialogic.get_variable("ItIsDay") == "true":
|
||||
SceneLoader.load_scene("res://resources/customControls/Water/Pristan/WaterDay.tscn");
|
||||
else :
|
||||
SceneLoader.load_scene("res://resources/customControls/Water/Pristan/WaterNight.tscn");
|
||||
|
||||
func WaterLoaded(obj):
|
||||
if obj.path != "res://resources/customControls/Water/Pristan/WaterDay.tscn" and obj.path != "res://resources/customControls/Water/Pristan/WaterNight.tscn":
|
||||
return ;
|
||||
|
||||
if Dialogic.get_variable("ItIsDay") == "true":
|
||||
$Day.add_child(obj.instance);
|
||||
$Day.move_child(obj.instance, 0);
|
||||
else :
|
||||
$Night.add_child(obj.instance);
|
||||
$Night.move_child(obj.instance, 0);
|
||||
obj.instance.play("default");
|
||||
|
||||
SceneLoader.disconnect("on_scene_loaded", self, "WaterLoaded");
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
$Cat.visible = false;
|
||||
scale = Vector2(0.5, 0.5)
|
||||
$Day.visible = true
|
||||
$Night.visible = false;
|
||||
$rain.visible = false;
|
||||
|
||||
|
||||
|
||||
if not GallerySingleton.HaveBackground("Pristan_n"):
|
||||
return [];
|
||||
|
||||
return ["ui_day", "ui_night"]
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_day"):
|
||||
$Day.visible = true;
|
||||
$Night.visible = false;
|
||||
$rain.visible = false;
|
||||
else :
|
||||
$Day.visible = false;
|
||||
$Night.visible = true;
|
||||
$rain.visible = true;
|
20
scripts/backround_scenes_scripts/Purple_Death_1.gd
Normal file
20
scripts/backround_scenes_scripts/Purple_Death_1.gd
Normal file
|
@ -0,0 +1,20 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Purple_Death_1")
|
||||
|
||||
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 InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
return [];
|
||||
|
||||
func SetSettings(setting):
|
||||
pass;
|
70
scripts/backround_scenes_scripts/Renata_sex.gd
Normal file
70
scripts/backround_scenes_scripts/Renata_sex.gd
Normal file
|
@ -0,0 +1,70 @@
|
|||
extends Node2D
|
||||
|
||||
const fadeTime = 1.7
|
||||
const fadeTime2 = 2.3
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Renata_sex");
|
||||
|
||||
if Dialogic.get_variable("SexSpriteNumber") == "2":
|
||||
$Sprite1.visible = false
|
||||
elif Dialogic.get_variable("SexSpriteNumber") == "3":
|
||||
$Sprite1.visible = false
|
||||
$Sprite2.visible = false
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_slideswitch_listener")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func _slideswitch_listener(string):
|
||||
match string:
|
||||
"sprite2":
|
||||
Dialogic.set_variable("SexSpriteNumber", 2)
|
||||
var tween = $"Tween"
|
||||
tween.interpolate_method(self, "Sprite1Interpolate", 1, 0, fadeTime, Tween.TRANS_CUBIC, 0)
|
||||
tween.start()
|
||||
"sprite3":
|
||||
Dialogic.set_variable("SexSpriteNumber", 3)
|
||||
var tween = $"Tween"
|
||||
tween.interpolate_method(self, "Sprite2Interpolate", 1, 0, fadeTime2, Tween.TRANS_LINEAR, 0)
|
||||
tween.start()
|
||||
|
||||
|
||||
func Sprite1Interpolate(value):
|
||||
$Sprite1.self_modulate.a = value
|
||||
|
||||
func Sprite2Interpolate(value):
|
||||
$Sprite2.self_modulate.a = value
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
return ["ui_gallery_fall_1", "ui_gallery_fall_2", "ui_gallery_fall_3"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_gallery_fall_1"):
|
||||
$Sprite1.visible = true;
|
||||
$Sprite2.visible = false;
|
||||
$Sprite3.visible = false;
|
||||
elif setting == tr("ui_gallery_fall_2"):
|
||||
$Sprite1.visible = false;
|
||||
$Sprite2.visible = true;
|
||||
$Sprite3.visible = false;
|
||||
elif setting == tr("ui_gallery_fall_3"):
|
||||
$Sprite1.visible = false;
|
||||
$Sprite2.visible = false;
|
||||
$Sprite3.visible = true;
|
45
scripts/backround_scenes_scripts/Roman_Orange.gd
Normal file
45
scripts/backround_scenes_scripts/Roman_Orange.gd
Normal file
|
@ -0,0 +1,45 @@
|
|||
extends Node2D
|
||||
|
||||
const fadeTime = 1.1
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Roman_Orange");
|
||||
|
||||
if Dialogic.get_variable("SexSpriteNumber") == "2":
|
||||
$Sprite1.visible = false
|
||||
$Sprite2.visible = true
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_slideswitch_listener")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func _slideswitch_listener(string):
|
||||
match string:
|
||||
"sprite2":
|
||||
Dialogic.set_variable("SexSpriteNumber", 2)
|
||||
var tween = $"Tween"
|
||||
tween.interpolate_property($Sprite1, "modulate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), fadeTime, Tween.TRANS_CUBIC, 0)
|
||||
tween.start()
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
return ["ui_gallery_fall_1", "ui_gallery_fall_2"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_gallery_fall_1"):
|
||||
$Sprite1.visible = true;
|
||||
$Sprite2.visible = false;
|
||||
else :
|
||||
$Sprite1.visible = false;
|
||||
$Sprite2.visible = true;
|
25
scripts/backround_scenes_scripts/Roman_black.gd
Normal file
25
scripts/backround_scenes_scripts/Roman_black.gd
Normal file
|
@ -0,0 +1,25 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
$EasterEggTimer.start();
|
||||
|
||||
GallerySingleton.AddImage("Roman_black");
|
||||
|
||||
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 _on_EasterEggTimer_timeout():
|
||||
var tempMaterial = $rain / Rain / Particles2D.get_process_material()
|
||||
tempMaterial.color = Color(0.56, 0.078, 0.078, 1)
|
||||
$rain / Rain / Particles2D.set_process_material(tempMaterial)
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
return [];
|
11
scripts/backround_scenes_scripts/Roman_blue.gd
Normal file
11
scripts/backround_scenes_scripts/Roman_blue.gd
Normal file
|
@ -0,0 +1,11 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Roman_blue");
|
||||
|
||||
func InitForGallery()->Array:
|
||||
$Sprite.scale = Vector2(0.5, 0.5)
|
||||
return [];
|
23
scripts/backround_scenes_scripts/Roman_green.gd
Normal file
23
scripts/backround_scenes_scripts/Roman_green.gd
Normal file
|
@ -0,0 +1,23 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Roman_green");
|
||||
|
||||
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 _on_EasterEggTimer_timeout():
|
||||
var tempMaterial = $rain / Rain / Particles2D.get_process_material()
|
||||
tempMaterial.color = Color(0.56, 0.078, 0.078, 1)
|
||||
$rain / Rain / Particles2D.set_process_material(tempMaterial)
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
return [];
|
11
scripts/backround_scenes_scripts/Roman_pink.gd
Normal file
11
scripts/backround_scenes_scripts/Roman_pink.gd
Normal file
|
@ -0,0 +1,11 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Roman_pink");
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
return [];
|
24
scripts/backround_scenes_scripts/Roman_violet.gd
Normal file
24
scripts/backround_scenes_scripts/Roman_violet.gd
Normal file
|
@ -0,0 +1,24 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Roman_violet");
|
||||
|
||||
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 _on_EasterEggTimer_timeout():
|
||||
var tempMaterial = $rain / Rain / Particles2D.get_process_material()
|
||||
tempMaterial.color = Color(0.56, 0.078, 0.078, 1)
|
||||
$rain / Rain / Particles2D.set_process_material(tempMaterial)
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
return [];
|
||||
|
67
scripts/backround_scenes_scripts/Room_Agatha.gd
Normal file
67
scripts/backround_scenes_scripts/Room_Agatha.gd
Normal file
|
@ -0,0 +1,67 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddBackground("Room_Agatha")
|
||||
|
||||
$Cat.Init(2, 8);
|
||||
$Cat.position = Vector2(1423, 725);
|
||||
|
||||
|
||||
call_deferred("VisibleBug");
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_lights_listener")
|
||||
|
||||
func VisibleBug():
|
||||
yield (get_tree().create_timer(0.2), "timeout");
|
||||
|
||||
if Dialogic.get_variable("LightsOn") == "1":
|
||||
$lights_on.visible = true
|
||||
$lights_off.visible = false
|
||||
else :
|
||||
$lights_on.visible = false
|
||||
$lights_off.visible = true
|
||||
|
||||
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);
|
||||
|
||||
FUCKVisibile();
|
||||
|
||||
return ["ui_gallery_light"];
|
||||
|
||||
func SetToggleSettings(button):
|
||||
if button.pressed:
|
||||
$lights_on.visible = true;
|
||||
$lights_off.visible = false;
|
||||
else :
|
||||
$lights_on.visible = false;
|
||||
$lights_off.visible = true;
|
||||
|
||||
func FUCKVisibile():
|
||||
var timer = Timer.new();
|
||||
add_child(timer);
|
||||
timer.set_wait_time(0.1);
|
||||
timer.set_one_shot(true);
|
||||
timer.start();
|
||||
timer.connect("timeout", self, "FUCKFUCK", [timer]);
|
||||
|
||||
func FUCKFUCK(timer):
|
||||
$lights_on.call_deferred("set_visible", false);
|
||||
$lights_off.call_deferred("set_visible", true);
|
||||
timer.disconnect("timeout", self, "FUCKFUCK")
|
||||
remove_child(timer);
|
64
scripts/backround_scenes_scripts/Room_Dana.gd
Normal file
64
scripts/backround_scenes_scripts/Room_Dana.gd
Normal file
|
@ -0,0 +1,64 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddBackground("Room_Dana")
|
||||
|
||||
|
||||
call_deferred("VisibleBug");
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_lights_listener")
|
||||
|
||||
func VisibleBug():
|
||||
yield (get_tree().create_timer(0.2), "timeout");
|
||||
|
||||
if Dialogic.get_variable("LightsOn") == "1":
|
||||
$lights_on.visible = true
|
||||
$lights_off.visible = false
|
||||
else :
|
||||
$lights_on.visible = false
|
||||
$lights_off.visible = true
|
||||
|
||||
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:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
scale = Vector2(0.5, 0.5);
|
||||
|
||||
FUCKVisibile();
|
||||
|
||||
return ["ui_gallery_light"];
|
||||
|
||||
func SetToggleSettings(button):
|
||||
if button.pressed:
|
||||
$lights_on.visible = true;
|
||||
$lights_off.visible = false;
|
||||
else :
|
||||
$lights_on.visible = false;
|
||||
$lights_off.visible = true;
|
||||
|
||||
func FUCKVisibile():
|
||||
var timer = Timer.new();
|
||||
add_child(timer);
|
||||
timer.set_wait_time(0.15);
|
||||
timer.set_one_shot(true);
|
||||
timer.start();
|
||||
timer.connect("timeout", self, "FUCKFUCK", [timer]);
|
||||
|
||||
func FUCKFUCK(timer):
|
||||
$lights_on.call_deferred("set_visible", false);
|
||||
$lights_off.call_deferred("set_visible", true);
|
||||
timer.disconnect("timeout", self, "FUCKFUCK")
|
||||
remove_child(timer);
|
67
scripts/backround_scenes_scripts/Room_Emiliya.gd
Normal file
67
scripts/backround_scenes_scripts/Room_Emiliya.gd
Normal file
|
@ -0,0 +1,67 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddBackground("Room_Emiliya")
|
||||
|
||||
|
||||
call_deferred("VisibleBug");
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_lights_listener")
|
||||
|
||||
func VisibleBug():
|
||||
yield (get_tree().create_timer(0.2), "timeout");
|
||||
|
||||
if Dialogic.get_variable("ItIsDay") == "true":
|
||||
$lights_on.visible = false
|
||||
$lights_off.visible = false
|
||||
$morning.visible = true
|
||||
GallerySingleton.AddBackground("Room_Emiliya_morning")
|
||||
elif int(Dialogic.get_variable("LightsOn")) == 1:
|
||||
$lights_on.visible = true
|
||||
$lights_off.visible = false
|
||||
$morning.visible = false
|
||||
else :
|
||||
$lights_on.visible = false
|
||||
$lights_off.visible = true
|
||||
$morning.visible = false
|
||||
|
||||
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:
|
||||
scale = Vector2(0.5, 0.5);
|
||||
|
||||
$lights_on.visible = true;
|
||||
$lights_off.visible = false;
|
||||
$morning.visible = false;
|
||||
|
||||
if GallerySingleton.HaveImage("Room_Emiliya_morning"):
|
||||
return ["ui_lights_on", "ui_lights_off", "ui_morning"];
|
||||
|
||||
return ["ui_lights_on", "ui_lights_off"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_lights_on"):
|
||||
$lights_on.visible = true;
|
||||
$lights_off.visible = false;
|
||||
$morning.visible = false;
|
||||
elif setting == tr("ui_lights_off"):
|
||||
$lights_on.visible = false;
|
||||
$lights_off.visible = true;
|
||||
$morning.visible = false;
|
||||
else :
|
||||
$lights_on.visible = false;
|
||||
$lights_off.visible = false;
|
||||
$morning.visible = true;
|
63
scripts/backround_scenes_scripts/Room_Linda.gd
Normal file
63
scripts/backround_scenes_scripts/Room_Linda.gd
Normal file
|
@ -0,0 +1,63 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddBackground("Room_Linda")
|
||||
|
||||
|
||||
call_deferred("VisibleBug");
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_lights_listener")
|
||||
|
||||
func VisibleBug():
|
||||
yield (get_tree().create_timer(0.2), "timeout");
|
||||
|
||||
if Dialogic.get_variable("LightsOn") == "1":
|
||||
$lights_on.visible = true
|
||||
$lights_off.visible = false
|
||||
else :
|
||||
$lights_on.visible = false
|
||||
$lights_off.visible = true
|
||||
|
||||
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:
|
||||
scale = Vector2(0.5, 0.5);
|
||||
|
||||
FUCKVisibile();
|
||||
|
||||
return ["ui_gallery_light"];
|
||||
|
||||
func SetToggleSettings(button):
|
||||
if button.pressed:
|
||||
$lights_on.visible = true;
|
||||
$lights_off.visible = false;
|
||||
else :
|
||||
$lights_on.visible = false;
|
||||
$lights_off.visible = true;
|
||||
|
||||
func FUCKVisibile():
|
||||
var timer = Timer.new();
|
||||
add_child(timer);
|
||||
timer.set_wait_time(0.1);
|
||||
timer.set_one_shot(true);
|
||||
timer.start();
|
||||
timer.connect("timeout", self, "FUCKFUCK", [timer]);
|
||||
|
||||
func FUCKFUCK(timer):
|
||||
$lights_on.call_deferred("set_visible", false);
|
||||
$lights_off.call_deferred("set_visible", true);
|
||||
timer.disconnect("timeout", self, "FUCKFUCK")
|
||||
remove_child(timer);
|
63
scripts/backround_scenes_scripts/Room_Martin.gd
Normal file
63
scripts/backround_scenes_scripts/Room_Martin.gd
Normal file
|
@ -0,0 +1,63 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddBackground("Room_Martin");
|
||||
|
||||
|
||||
call_deferred("VisibleBug");
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_lights_listener")
|
||||
|
||||
func VisibleBug():
|
||||
yield (get_tree().create_timer(0.2), "timeout");
|
||||
|
||||
if int(Dialogic.get_variable("LightsOn")) == 1:
|
||||
$lights_on.visible = true
|
||||
$lights_off.visible = false
|
||||
else :
|
||||
$lights_on.visible = false
|
||||
$lights_off.visible = true
|
||||
|
||||
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:
|
||||
scale = Vector2(0.5, 0.5);
|
||||
|
||||
FUCKVisibile();
|
||||
|
||||
return ["ui_gallery_light"];
|
||||
|
||||
func SetToggleSettings(button):
|
||||
if button.pressed:
|
||||
$lights_on.visible = true;
|
||||
$lights_off.visible = false;
|
||||
else :
|
||||
$lights_on.visible = false;
|
||||
$lights_off.visible = true;
|
||||
|
||||
func FUCKVisibile():
|
||||
var timer = Timer.new();
|
||||
add_child(timer);
|
||||
timer.set_wait_time(0.1);
|
||||
timer.set_one_shot(true);
|
||||
timer.start();
|
||||
timer.connect("timeout", self, "FUCKFUCK", [timer]);
|
||||
|
||||
func FUCKFUCK(timer):
|
||||
$lights_on.call_deferred("set_visible", false);
|
||||
$lights_off.call_deferred("set_visible", true);
|
||||
timer.disconnect("timeout", self, "FUCKFUCK")
|
||||
remove_child(timer);
|
180
scripts/backround_scenes_scripts/Sarai.gd
Normal file
180
scripts/backround_scenes_scripts/Sarai.gd
Normal file
|
@ -0,0 +1,180 @@
|
|||
extends Node2D
|
||||
|
||||
const lightPower = 3.7
|
||||
const zoomTime = 3.5
|
||||
var cameraPosition
|
||||
|
||||
var thread;
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
cameraPosition = Dialogic.get_variable("SaraiZoomed")
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_whospeaks_listener")
|
||||
|
||||
GallerySingleton.AddBackground("Sarai");
|
||||
|
||||
var isDay = true;
|
||||
if int(Dialogic.get_variable("SaraiFire")) == 1:
|
||||
if int(Dialogic.get_variable("SaraiZoomed")) == 1:
|
||||
self.scale = Vector2(1.5, 1.5)
|
||||
self.position = Vector2( - 960, - 540)
|
||||
ChangeParticleSize(0.9)
|
||||
$Background.visible = false;
|
||||
$Clouds.visible = false;
|
||||
$Day.visible = false
|
||||
$Night.visible = false
|
||||
$NightFire.visible = true
|
||||
$rain.visible = true;
|
||||
$Smoke.visible = true;
|
||||
if cameraPosition == "0":
|
||||
$NightFire / objects.visible = false
|
||||
else :
|
||||
$NightFire / objects.visible = true
|
||||
if int(Dialogic.get_variable("Is_Purple_Dead")) == 0:
|
||||
$NightFire / objects / Purple.visible = true
|
||||
if int(Dialogic.get_variable("Is_Red_Dead")) == 0:
|
||||
$NightFire / objects / Red.visible = true
|
||||
if int(Dialogic.get_variable("Is_Green_Dead")) == 0:
|
||||
$NightFire / objects / Green.visible = true
|
||||
if int(Dialogic.get_variable("Is_White_Dead")) == 0:
|
||||
$NightFire / objects / White.visible = true
|
||||
if int(Dialogic.get_variable("Is_Orange_Dead")) == 0:
|
||||
$NightFire / objects / Orange.visible = true
|
||||
|
||||
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Sarai_fire.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("Sarai_fire");
|
||||
|
||||
Dialogic.set_variable("Prichal", "1");
|
||||
else :
|
||||
if Dialogic.get_variable("ItIsDay") == "true":
|
||||
$Background.visible = true;
|
||||
$Day.visible = true
|
||||
$Clouds.visible = true;
|
||||
$Night.visible = false
|
||||
$NightFire.visible = false
|
||||
else :
|
||||
$Background.visible = false;
|
||||
$Clouds.visible = false;
|
||||
$Day.visible = false
|
||||
$Night.visible = true
|
||||
$NightFire.visible = false
|
||||
|
||||
$rain.visible = true;
|
||||
|
||||
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("Sarai_n");
|
||||
|
||||
func _whospeaks_listener(string):
|
||||
EndSpeech()
|
||||
match string:
|
||||
"Brown":
|
||||
$NightFire / objects / Brown / Brown_light.energy = lightPower
|
||||
"Purple":
|
||||
$NightFire / objects / Purple / Purple_light.energy = lightPower
|
||||
"Red":
|
||||
$NightFire / objects / Red / Red_light.energy = lightPower
|
||||
"Green":
|
||||
$NightFire / objects / Green / Green_light.energy = lightPower
|
||||
"White":
|
||||
$NightFire / objects / White / White_light.energy = lightPower
|
||||
"Orange":
|
||||
$NightFire / objects / Orange / Orange_light.energy = lightPower
|
||||
"zoom":
|
||||
ZoomIn()
|
||||
Dialogic.set_variable("SaraiZoomed", 1)
|
||||
"zoom_out":
|
||||
ZoomOut()
|
||||
Dialogic.set_variable("SaraiZoomed", 0)
|
||||
|
||||
|
||||
|
||||
func EndSpeech():
|
||||
$NightFire / objects / Brown / Brown_light.energy = 0
|
||||
$NightFire / objects / Green / Green_light.energy = 0
|
||||
$NightFire / objects / Orange / Orange_light.energy = 0
|
||||
$NightFire / objects / Purple / Purple_light.energy = 0
|
||||
$NightFire / objects / Red / Red_light.energy = 0
|
||||
$NightFire / objects / White / White_light.energy = 0
|
||||
|
||||
func ZoomIn():
|
||||
$Tween.interpolate_property(self, "scale", Vector2(1, 1), Vector2(1.5, 1.5), zoomTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", Vector2(0, 0), Vector2( - 960, - 540), zoomTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_method(self, "ChangeParticleSize", 1.5, 0.9, zoomTime, Tween.TRANS_LINEAR, 0)
|
||||
$NightFire / objects.modulate.a = 0.0
|
||||
$NightFire / objects.visible = true
|
||||
$Tween.interpolate_property($NightFire / objects, "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), zoomTime, Tween.TRANS_LINEAR, 0)
|
||||
|
||||
$Tween.start()
|
||||
|
||||
func ZoomOut():
|
||||
$Tween.interpolate_property(self, "scale", self.scale, Vector2(1.5, 1.5), zoomTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, Vector2( - 800, - 300), zoomTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_method(self, "ChangeParticleSize", 0.9, 1.5, zoomTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property($NightFire / objects, "modulate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), zoomTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
|
||||
func ChangeParticleSize(size):
|
||||
$rain / Particles2D.process_material.scale = size
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
var night = GallerySingleton.HaveBackground("Sarai_n");
|
||||
var fire = GallerySingleton.HaveBackground("Sarai_fire");
|
||||
|
||||
$Day.visible = true;
|
||||
$Clouds.visible = true;
|
||||
$Night.visible = false;
|
||||
$NightFire.visible = false;
|
||||
$Smoke.visible = false;
|
||||
$rain.visible = false;
|
||||
|
||||
if not night and not fire:
|
||||
return [];
|
||||
if night and not fire:
|
||||
return ["ui_day", "ui_night"]
|
||||
if not night and fire:
|
||||
return ["ui_day", "ui_gallery_fire"]
|
||||
return ["ui_day", "ui_night", "ui_gallery_fire"]
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_day"):
|
||||
$Background.visible = true;
|
||||
$Day.visible = true;
|
||||
$Clouds.visible = true;
|
||||
$Night.visible = false;
|
||||
$NightFire.visible = false;
|
||||
$Smoke.visible = false;
|
||||
$rain.visible = false;
|
||||
elif setting == tr("ui_night"):
|
||||
$Background.visible = false;
|
||||
$Clouds.visible = false;
|
||||
$Day.visible = false;
|
||||
$Night.visible = true;
|
||||
$NightFire.visible = false;
|
||||
$Smoke.visible = false;
|
||||
$rain.visible = true;
|
||||
|
||||
else :
|
||||
$Background.visible = false;
|
||||
$Clouds.visible = false;
|
||||
$Day.visible = false;
|
||||
$Night.visible = false;
|
||||
$NightFire.visible = true;
|
||||
$Smoke.visible = true;
|
||||
$rain.visible = true;
|
10
scripts/backround_scenes_scripts/Scene0.gd
Normal file
10
scripts/backround_scenes_scripts/Scene0.gd
Normal file
|
@ -0,0 +1,10 @@
|
|||
extends Node2D
|
||||
|
||||
onready var isEnding = false
|
||||
|
||||
func _ready():
|
||||
$ForScale / Text.bbcode_text = tr("ui_quote");
|
||||
|
||||
|
||||
|
||||
get_parent().get_parent().get_node("Game").get_child(0).get_node("DialogNode").get_node("BackButton").visible = false
|
163
scripts/backround_scenes_scripts/Scene12.gd
Normal file
163
scripts/backround_scenes_scripts/Scene12.gd
Normal file
|
@ -0,0 +1,163 @@
|
|||
extends Node2D
|
||||
|
||||
const zoomStart = 1.0
|
||||
const zoomEnd = 0.97
|
||||
const bloodStart = 0.2
|
||||
const bloodEnd = 0.9
|
||||
const timeParam = 1.7
|
||||
|
||||
var isDead
|
||||
var bloodIncrement
|
||||
var zoomIncrement
|
||||
var currentZoom
|
||||
var currentEnergy
|
||||
var isIncreasing
|
||||
var screenWidth;
|
||||
var screenHeight;
|
||||
var xOffset;
|
||||
var yOffset
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
InitWater();
|
||||
|
||||
if Dialogic.get_variable("ItIsDay") == "true":
|
||||
$Day.visible = true;
|
||||
$Night.visible = false;
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Mayak_day.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
GallerySingleton.AddBackground("Scene12");
|
||||
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":
|
||||
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");
|
||||
$Lightning.Init(1, player);
|
||||
|
||||
GallerySingleton.AddBackground("Scene12_n");
|
||||
|
||||
|
||||
isDead = false
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_begin_death")
|
||||
bloodIncrement = (bloodEnd - bloodStart) / timeParam;
|
||||
zoomIncrement = (zoomEnd - zoomStart) / timeParam;
|
||||
currentZoom = zoomStart
|
||||
isIncreasing = true
|
||||
currentEnergy = 0
|
||||
screenWidth = SettingsSingleton.GetCurrectScreenResolutionVector2().x
|
||||
screenHeight = SettingsSingleton.GetCurrectScreenResolutionVector2().y
|
||||
|
||||
func _process(delta):
|
||||
if (isDead):
|
||||
if (isIncreasing):
|
||||
if (currentEnergy <= bloodEnd):
|
||||
|
||||
currentEnergy += bloodIncrement * delta
|
||||
currentZoom += zoomIncrement * delta
|
||||
$death / Light2D.self_modulate.a = currentEnergy
|
||||
xOffset = (1 - currentZoom) * ($death / Polygon2D.get_global_transform_with_canvas().origin.x) / (screenWidth);
|
||||
print(xOffset)
|
||||
yOffset = (1 - currentZoom) * (screenHeight - $death / Polygon2D.get_global_transform_with_canvas().origin.y) / screenHeight;
|
||||
var offset = Vector2(xOffset, yOffset);
|
||||
var tiling = Vector2(currentZoom, currentZoom)
|
||||
$death / Polygon2D.material.set_shader_param("offset", offset)
|
||||
$death / Polygon2D.material.set_shader_param("tiling", tiling);
|
||||
else :
|
||||
isIncreasing = false
|
||||
if ( not isIncreasing):
|
||||
if (currentEnergy >= bloodStart):
|
||||
|
||||
currentEnergy -= bloodIncrement * delta
|
||||
currentZoom -= zoomIncrement * delta
|
||||
$death / Light2D.self_modulate.a = currentEnergy
|
||||
xOffset = (1 - currentZoom) * ($death / Polygon2D.get_global_transform_with_canvas().origin.x) / (screenWidth);
|
||||
yOffset = (1 - currentZoom) * (screenHeight - $death / Polygon2D.get_global_transform_with_canvas().origin.y) / screenHeight;
|
||||
var offset = Vector2(xOffset, yOffset);
|
||||
$death / Polygon2D.material.set_shader_param("offset", offset)
|
||||
$death / Polygon2D.material.set_shader_param("tiling", Vector2(currentZoom, currentZoom));
|
||||
else :
|
||||
isIncreasing = true
|
||||
else :pass
|
||||
func _begin_death(string):
|
||||
match string:
|
||||
"death":
|
||||
$death.visible = true;
|
||||
var tween = $death.get_child(0).get_child(0)
|
||||
var light = $death.get_child(0)
|
||||
tween.interpolate_method(self, "bloodInterpolate", 0.0, bloodStart, 1.0, Tween.TRANS_LINEAR, 0);
|
||||
tween.start()
|
||||
yield ($death.get_child(0).get_child(0), "tween_all_completed")
|
||||
currentEnergy = bloodStart
|
||||
$death.get_child(0).self_modulate.a = bloodStart
|
||||
isDead = true;
|
||||
|
||||
func bloodInterpolate(value):
|
||||
$death / Light2D.self_modulate.a = value;
|
||||
|
||||
func InitWater():
|
||||
SceneLoader.connect("on_scene_loaded", self, "WaterLoaded");
|
||||
SceneLoader.load_scene("res://resources/customControls/Water/Scene12/Water.tscn");
|
||||
|
||||
func WaterLoaded(obj):
|
||||
if obj.path != "res://resources/customControls/Water/Scene12/Water.tscn":
|
||||
return ;
|
||||
add_child(obj.instance);
|
||||
move_child(obj.instance, 2)
|
||||
|
||||
obj.instance.play("default");
|
||||
|
||||
SceneLoader.disconnect("on_scene_loaded", self, "WaterLoaded");
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
InitGalleryWater();
|
||||
|
||||
$Day.visible = true;
|
||||
$Night.visible = false;
|
||||
|
||||
if not GallerySingleton.HaveBackground("Scene12_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;
|
||||
|
||||
var thread
|
||||
|
||||
func InitGalleryWater():
|
||||
if has_node("Water"):
|
||||
return
|
||||
|
||||
if thread == null:
|
||||
thread = Thread.new();
|
||||
|
||||
thread.start(self, "GalleryWater");
|
||||
|
||||
func GalleryWater():
|
||||
var water = load("res://resources/customControls/Water/Scene12/Water.tscn").instance();
|
||||
add_child(water);
|
||||
move_child(water, 2)
|
||||
water.scale = Vector2(3, 3);
|
||||
water.play("default");
|
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;
|
181
scripts/backround_scenes_scripts/Scene2_1.gd
Normal file
181
scripts/backround_scenes_scripts/Scene2_1.gd
Normal file
|
@ -0,0 +1,181 @@
|
|||
extends Node2D
|
||||
|
||||
onready var isPowerProblem = false
|
||||
onready var lightTimer = 0.0
|
||||
onready var tweenSwitcher = 0
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
InitCat();
|
||||
InitCrowd()
|
||||
|
||||
GallerySingleton.AddBackground("Scene2_1")
|
||||
|
||||
$Camera.current = true;
|
||||
$Camera.zoom = Vector2(3, 3)
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
|
||||
dialogicNode.connect("dialogic_signal", self, "_character_listener")
|
||||
SetTime();
|
||||
dialogicNode.connect("dialogic_signal", self, "_time_listener")
|
||||
if (Dialogic.get_variable("needRenata") == "0"):
|
||||
RemoveCharacter("Renata")
|
||||
else :ReturnCharacter("Renata")
|
||||
if (Dialogic.get_variable("needHenry") == "0"):
|
||||
RemoveCharacter("Henry")
|
||||
else :ReturnCharacter("Henry")
|
||||
if (Dialogic.get_variable("needTable") == "0"):
|
||||
RemoveCharacter("table")
|
||||
else :ReturnCharacter("table")
|
||||
if (Dialogic.get_variable("needCandles") == "0"):
|
||||
$little_objects / candles.visible = false
|
||||
|
||||
|
||||
func RemoveCharacter(charName):
|
||||
$removables.get_node(charName).visible = false;
|
||||
|
||||
func ReturnCharacter(charName):
|
||||
$removables.get_node(charName).visible = true;
|
||||
|
||||
func RemoveCharacterSlowly(charName):
|
||||
var fadeTween = $removables / FadeTween
|
||||
fadeTween.interpolate_property(
|
||||
$removables.get_node(charName), "modulate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), 1.0,
|
||||
Tween.TRANS_LINEAR, Tween.EASE_IN_OUT
|
||||
)
|
||||
fadeTween.start()
|
||||
yield (fadeTween, "tween_all_completed")
|
||||
RemoveCharacter(charName)
|
||||
|
||||
func ReturnCharacterSlowly(charName):
|
||||
$removables.get_node(charName).modulate = Color(1, 1, 1, 0)
|
||||
ReturnCharacter(charName)
|
||||
var fadeTween = $removables / FadeTween
|
||||
fadeTween.interpolate_property(
|
||||
$removables.get_node(charName), "modulate", Color(1, 1, 1, 0), Color(1, 1, 1, 1), 1.0,
|
||||
Tween.TRANS_LINEAR, Tween.EASE_IN_OUT
|
||||
)
|
||||
fadeTween.start()
|
||||
|
||||
func _character_listener(string):
|
||||
match string:
|
||||
"remove_renata":
|
||||
RemoveCharacter("Renata")
|
||||
Dialogic.set_variable("needRenata", 0)
|
||||
"remove_henry":
|
||||
RemoveCharacter("Henry")
|
||||
Dialogic.set_variable("needHenry", 0)
|
||||
"remove_table":
|
||||
RemoveCharacter("table")
|
||||
Dialogic.set_variable("needTable", 0)
|
||||
"remove_henry11":
|
||||
RemoveCharacter("Henry11")
|
||||
"return_renata":
|
||||
ReturnCharacter("Renata")
|
||||
Dialogic.set_variable("needRenata", 1)
|
||||
"return_henry":
|
||||
ReturnCharacter("Henry")
|
||||
Dialogic.set_variable("needHenry", 1)
|
||||
"return_table":
|
||||
ReturnCharacter("table")
|
||||
Dialogic.set_variable("needTable", 1)
|
||||
"return_henry11_fade":
|
||||
ReturnCharacterSlowly("Henry11")
|
||||
"remove_henry_fade":
|
||||
RemoveCharacterSlowly("Henry")
|
||||
Dialogic.set_variable("needHenry", 0)
|
||||
"tv_turn_off":
|
||||
$little_objects / tv_screen.visible = false
|
||||
"remove_oldman":
|
||||
RemoveCharacterSlowly("Man2")
|
||||
|
||||
|
||||
func _time_listener(string):
|
||||
match string:
|
||||
"change_time":
|
||||
SetTime()
|
||||
|
||||
func SetTime():
|
||||
|
||||
var hour_hand = $little_objects / clock.get_child(0);
|
||||
var minute_hand = $little_objects / clock.get_child(1);
|
||||
var time = int(Dialogic.get_variable("Time"))
|
||||
var minDegrees = (time % 60) * 6
|
||||
var hourDegrees = - 54 + int(time / 60) * 30 + (time % 60) / 10
|
||||
|
||||
hour_hand.set_rotation_degrees(hourDegrees);
|
||||
minute_hand.set_rotation_degrees(minDegrees);
|
||||
|
||||
func _process(delta):
|
||||
if ( not isPowerProblem):
|
||||
lightTimer += delta * rand_range(0.0, 1.0)
|
||||
if (lightTimer >= 8.0):
|
||||
isPowerProblem = true
|
||||
LightPowerBlink();
|
||||
|
||||
|
||||
func LightPowerBlink():
|
||||
tweenSwitcher = 0
|
||||
var tween = $Lights / Tween
|
||||
tween.interpolate_property($Lights / candellier_light, "energy", 1.5, 0.9, 1.2, Tween.TRANS_CUBIC, 0)
|
||||
tween.interpolate_property($Lights / lamp_light, "energy", 1.2, 0.7, 1.2, Tween.TRANS_CUBIC, 0)
|
||||
tween.start()
|
||||
|
||||
func _on_Tween_tween_all_completed():
|
||||
var tween = $Lights / Tween
|
||||
if (tweenSwitcher == 0):
|
||||
tween.interpolate_property($Lights / candellier_light, "energy", 0.9, 1.5, 1.2, Tween.TRANS_CUBIC, 0)
|
||||
tween.interpolate_property($Lights / lamp_light, "energy", 0.7, 1.2, 1.2, Tween.TRANS_CUBIC, 0)
|
||||
tweenSwitcher = 1
|
||||
tween.start()
|
||||
if (tweenSwitcher == 1):
|
||||
lightTimer = 0.0
|
||||
isPowerProblem = false
|
||||
|
||||
func InitCat():
|
||||
|
||||
var beforeDate = Dialogic.get_variable("ItIsDay") == "true";
|
||||
if beforeDate:
|
||||
$Cat.Init(2, 1);
|
||||
$Cat.position = Vector2(1240, 175);
|
||||
else :
|
||||
|
||||
$Cat.Init(2, 3);
|
||||
$Cat.position = Vector2(1542, 730);
|
||||
|
||||
func InitCrowd():
|
||||
var time = int(Dialogic.get_variable("Time"))
|
||||
if time > 0:
|
||||
$removables / Man2.visible = false
|
||||
if time > 15:
|
||||
$removables / Man1.visible = false
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
$Cat.visible = false;
|
||||
|
||||
$removables / Renata.visible = false;
|
||||
$removables / Henry.visible = false;
|
||||
$removables / Man1.visible = false;
|
||||
$removables / Man2.visible = false;
|
||||
|
||||
return ["ui_gallery_people"]
|
||||
|
||||
|
||||
func SetToggleSettings(button):
|
||||
var state = button.pressed;
|
||||
|
||||
if state == true:
|
||||
$removables / Renata.visible = true;
|
||||
$removables / Henry.visible = true;
|
||||
$removables / Man1.visible = true;
|
||||
$removables / Man2.visible = true;
|
||||
else :
|
||||
$removables / Renata.visible = false;
|
||||
$removables / Henry.visible = false;
|
||||
$removables / Man1.visible = false;
|
||||
$removables / Man2.visible = false;
|
||||
|
60
scripts/backround_scenes_scripts/Scene2_2.gd
Normal file
60
scripts/backround_scenes_scripts/Scene2_2.gd
Normal file
|
@ -0,0 +1,60 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_character_listener")
|
||||
|
||||
GallerySingleton.AddBackground("Scene2_2")
|
||||
|
||||
if int(Dialogic.get_variable("LightsOn")) == 1:
|
||||
$Lights_on.visible = true
|
||||
$Lights_off.visible = false
|
||||
if Dialogic.get_variable("1_Death_Knife") == "none":
|
||||
$Lights_on / Knife.visible = true
|
||||
else :
|
||||
$Lights_on / Knife.visible = false
|
||||
|
||||
InitCat();
|
||||
else :
|
||||
$Lights_on.visible = false
|
||||
$Lights_off.visible = true
|
||||
if int(Dialogic.get_variable("Candle")) == 1:
|
||||
$Lights_off / candle.visible = true
|
||||
else :
|
||||
$Lights_off / candle.visible = false
|
||||
|
||||
$Cat.visible = false;
|
||||
|
||||
func InitCat():
|
||||
$Cat.Init(2, 2);
|
||||
$Cat.position = Vector2(1590, 609);
|
||||
$Cat.rotation_degrees = 3;
|
||||
$Cat.Scale(0.85);
|
||||
|
||||
func _character_listener(string):
|
||||
match string:
|
||||
"add_renata":
|
||||
$removables / renata.visible = Dialogic.get_variable("Is_Orange_Dead") == "0";
|
||||
"remove_renata":
|
||||
$removables / renata.visible = false;
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
$Cat.visible = false;
|
||||
$Lights_on / Knife.visible = true;
|
||||
|
||||
return ["ui_lights_on", "ui_lights_off"]
|
||||
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_lights_on"):
|
||||
$Lights_on.visible = true;
|
||||
$Lights_off.visible = false;
|
||||
$Lights_off / candle.visible = false;
|
||||
else :
|
||||
$Lights_on.visible = false;
|
||||
$Lights_off.visible = true;
|
||||
$Lights_off / candle.visible = true
|
39
scripts/backround_scenes_scripts/Scene4.gd
Normal file
39
scripts/backround_scenes_scripts/Scene4.gd
Normal file
|
@ -0,0 +1,39 @@
|
|||
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;
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Forest_day.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
GallerySingleton.AddBackground("Scene4")
|
||||
else :
|
||||
$Day.visible = false;
|
||||
$Night.visible = true;
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Rain Loop.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
GallerySingleton.AddBackground("Scene4_n")
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
if not GallerySingleton.HaveBackground("Scene4_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;
|
46
scripts/backround_scenes_scripts/Scene6.gd
Normal file
46
scripts/backround_scenes_scripts/Scene6.gd
Normal file
|
@ -0,0 +1,46 @@
|
|||
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;
|
||||
|
||||
call_deferred("InitCat");
|
||||
|
||||
get_tree().root.get_node("Root").StopSFX();
|
||||
|
||||
GallerySingleton.AddBackground("Scene6")
|
||||
else :
|
||||
$Day.visible = false;
|
||||
$Night.visible = true;
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/Rain Loop.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
GallerySingleton.AddBackground("Scene6_n")
|
||||
|
||||
func InitCat():
|
||||
$Cat.Init(999, 7);
|
||||
$Cat.position = Vector2(195, 595);
|
||||
$Cat.Scale(0.55)
|
||||
$Cat.visible = true;
|
||||
|
||||
func InitForGallery()->Array:
|
||||
$Cat.visible = false;
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
if not GallerySingleton.HaveBackground("Scene6_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;
|
186
scripts/backround_scenes_scripts/Scene7.gd
Normal file
186
scripts/backround_scenes_scripts/Scene7.gd
Normal file
|
@ -0,0 +1,186 @@
|
|||
extends Node2D
|
||||
|
||||
const zoomStart = 1.0
|
||||
const zoomEnd = 0.97
|
||||
const bloodStart = 0.2
|
||||
const bloodEnd = 0.9
|
||||
const timeParam = 1.7
|
||||
|
||||
var isDead
|
||||
var bloodIncrement
|
||||
var zoomIncrement
|
||||
var currentZoom
|
||||
var currentEnergy
|
||||
var isIncreasing
|
||||
var screenWidth;
|
||||
var screenHeight;
|
||||
var xOffset;
|
||||
var yOffset
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
InitWater();
|
||||
|
||||
if Dialogic.get_variable("ItIsDay") == "true":
|
||||
$Day.visible = true;
|
||||
$Night.visible = false;
|
||||
|
||||
get_tree().root.get_node("Root").StopSFX();
|
||||
|
||||
GallerySingleton.AddBackground("Scene7");
|
||||
else :
|
||||
$Day.visible = false;
|
||||
$Night.visible = true;
|
||||
|
||||
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(2, player);
|
||||
|
||||
GallerySingleton.AddBackground("Scene7_n");
|
||||
|
||||
isDead = false
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_begin_death")
|
||||
bloodIncrement = (bloodEnd - bloodStart) / timeParam;
|
||||
zoomIncrement = (zoomEnd - zoomStart) / timeParam;
|
||||
currentZoom = zoomStart
|
||||
isIncreasing = true
|
||||
currentEnergy = 0
|
||||
screenWidth = SettingsSingleton.GetCurrectScreenResolutionVector2().x
|
||||
screenHeight = SettingsSingleton.GetCurrectScreenResolutionVector2().y
|
||||
|
||||
func _process(delta):
|
||||
if (isDead):
|
||||
if (isIncreasing):
|
||||
if (currentEnergy <= bloodEnd):
|
||||
|
||||
currentEnergy += bloodIncrement * delta
|
||||
currentZoom += zoomIncrement * delta
|
||||
$death / Light2D.self_modulate.a = currentEnergy
|
||||
xOffset = (1 - currentZoom) * ($death / Polygon2D.get_global_transform_with_canvas().origin.x) / (screenWidth);
|
||||
print(xOffset)
|
||||
yOffset = (1 - currentZoom) * (screenHeight - $death / Polygon2D.get_global_transform_with_canvas().origin.y) / screenHeight;
|
||||
var offset = Vector2(xOffset, yOffset);
|
||||
var tiling = Vector2(currentZoom, currentZoom)
|
||||
$death / Polygon2D.material.set_shader_param("offset", offset)
|
||||
$death / Polygon2D.material.set_shader_param("tiling", tiling);
|
||||
else :
|
||||
isIncreasing = false
|
||||
if ( not isIncreasing):
|
||||
if (currentEnergy >= bloodStart):
|
||||
|
||||
currentEnergy -= bloodIncrement * delta
|
||||
currentZoom -= zoomIncrement * delta
|
||||
$death / Light2D.self_modulate.a = currentEnergy
|
||||
xOffset = (1 - currentZoom) * ($death / Polygon2D.get_global_transform_with_canvas().origin.x) / (screenWidth);
|
||||
yOffset = (1 - currentZoom) * (screenHeight - $death / Polygon2D.get_global_transform_with_canvas().origin.y) / screenHeight;
|
||||
var offset = Vector2(xOffset, yOffset);
|
||||
$death / Polygon2D.material.set_shader_param("offset", offset)
|
||||
$death / Polygon2D.material.set_shader_param("tiling", Vector2(currentZoom, currentZoom));
|
||||
else :
|
||||
isIncreasing = true
|
||||
else :pass
|
||||
func _begin_death(string):
|
||||
match string:
|
||||
"death":
|
||||
$death.visible = true;
|
||||
var tween = $death.get_child(0).get_child(0)
|
||||
var light = $death.get_child(0)
|
||||
tween.interpolate_method(self, "bloodInterpolate", 0.0, bloodStart, 1.0, Tween.TRANS_LINEAR, 0);
|
||||
tween.start()
|
||||
yield ($death.get_child(0).get_child(0), "tween_all_completed")
|
||||
currentEnergy = bloodStart
|
||||
$death.get_child(0).self_modulate.a = bloodStart
|
||||
isDead = true;
|
||||
|
||||
func bloodInterpolate(value):
|
||||
$death / Light2D.self_modulate.a = value;
|
||||
|
||||
func InitWater():
|
||||
var _temp = SceneLoader.connect("on_scene_loaded", self, "WaterLoaded");
|
||||
if Dialogic.get_variable("ItIsDay") == "true":
|
||||
SceneLoader.load_scene("res://resources/customControls/Water/Scene7/WaterDay.tscn");
|
||||
else :
|
||||
SceneLoader.load_scene("res://resources/customControls/Water/Scene7/WaterNight.tscn");
|
||||
|
||||
func WaterLoaded(obj):
|
||||
if obj.path != "res://resources/customControls/Water/Scene7/WaterDay.tscn" and obj.path != "res://resources/customControls/Water/Scene7/WaterNight.tscn":
|
||||
return ;
|
||||
|
||||
if Dialogic.get_variable("ItIsDay") == "true":
|
||||
$Day.add_child(obj.instance);
|
||||
obj.instance.z_index = 1;
|
||||
else :
|
||||
$Night.add_child(obj.instance);
|
||||
obj.instance.z_index = 3;
|
||||
|
||||
obj.instance.play("default");
|
||||
|
||||
SceneLoader.disconnect("on_scene_loaded", self, "WaterLoaded");
|
||||
|
||||
var galleryWaterState = ""
|
||||
var thread:Thread;
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
z_index = - 1;
|
||||
|
||||
InitGalleryWater("day");
|
||||
|
||||
if not GallerySingleton.HaveBackground("Scene7_n"):
|
||||
return [];
|
||||
|
||||
return ["ui_day", "ui_night"]
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_day"):
|
||||
$Day.visible = true;
|
||||
$Night.visible = false;
|
||||
InitGalleryWater("day");
|
||||
else :
|
||||
$Day.visible = false;
|
||||
$Night.visible = true;
|
||||
InitGalleryWater("night");
|
||||
|
||||
func InitGalleryWater(state):
|
||||
galleryWaterState = state;
|
||||
|
||||
if galleryWaterState == "day":
|
||||
if $Day.has_node("Water"):
|
||||
return ;
|
||||
else :
|
||||
if $Night.has_node("Water"):
|
||||
return ;
|
||||
|
||||
if thread == null:
|
||||
thread = Thread.new();
|
||||
|
||||
thread.start(self, "GalleryWater", galleryWaterState);
|
||||
|
||||
func GalleryWater(state):
|
||||
if state == "day":
|
||||
var instance = load("res://resources/customControls/Water/Scene7/WaterDay.tscn").instance()
|
||||
call_deferred("GalleryAddWater");
|
||||
return instance;
|
||||
else :
|
||||
print("aa")
|
||||
var instance = load("res://resources/customControls/Water/Scene7/WaterNight.tscn").instance()
|
||||
call_deferred("GalleryAddWater");
|
||||
return instance;
|
||||
|
||||
func GalleryAddWater():
|
||||
var instance = thread.wait_to_finish();
|
||||
if galleryWaterState == "day":
|
||||
$Day.add_child(instance);
|
||||
instance.z_index = 1;
|
||||
instance.play("default");
|
||||
else :
|
||||
$Night.add_child(instance);
|
||||
instance.z_index = 3;
|
||||
instance.play("default");
|
40
scripts/backround_scenes_scripts/Scene8.gd
Normal file
40
scripts/backround_scenes_scripts/Scene8.gd
Normal file
|
@ -0,0 +1,40 @@
|
|||
extends Node2D
|
||||
|
||||
onready var light1 = $Lights / Light2D;
|
||||
onready var light2 = $Lights / Light2D2
|
||||
var maxEnergy = 2.5
|
||||
var minEnergy = 1.0
|
||||
var timeFactor = 3.5
|
||||
var isIncreasing;
|
||||
|
||||
func _ready():
|
||||
light1.energy = maxEnergy
|
||||
isIncreasing = false
|
||||
|
||||
var windowSize = SettingsSingleton.GetCurrectScreenResolutionVector2();
|
||||
|
||||
$Cloud1.position = Vector2( - 500, - windowSize.y * 0.1)
|
||||
$Cloud2.position = Vector2(0, - windowSize.y * 0.35)
|
||||
|
||||
GallerySingleton.AddBackground("Scene8")
|
||||
|
||||
|
||||
|
||||
func _process(delta):
|
||||
|
||||
if (isIncreasing):
|
||||
light1.energy += delta / timeFactor;
|
||||
if light1.energy > maxEnergy:
|
||||
light1.energy = maxEnergy
|
||||
isIncreasing = false
|
||||
elif ( not isIncreasing):
|
||||
light1.energy -= delta / timeFactor;
|
||||
if light1.energy < minEnergy:
|
||||
light1.energy = minEnergy
|
||||
isIncreasing = true
|
||||
|
||||
func InitForGallery()->Array:
|
||||
for i in get_children():
|
||||
if i is Node2D:
|
||||
i.scale = Vector2(0.5, 0.5)
|
||||
return [];
|
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()
|
64
scripts/backround_scenes_scripts/Scene_alt1.gd
Normal file
64
scripts/backround_scenes_scripts/Scene_alt1.gd
Normal file
|
@ -0,0 +1,64 @@
|
|||
extends Node2D
|
||||
|
||||
var dialogNode
|
||||
var buttonpressed:bool
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
buttonpressed = false
|
||||
GallerySingleton.AddBackground("Scene_alt1");
|
||||
|
||||
var locale = TranslationServer.get_locale();
|
||||
if locale == "en":
|
||||
$Sprite.visible = false;
|
||||
$Sprite2.visible = true;
|
||||
$Sprite3.visible = false;
|
||||
elif locale == "ru":
|
||||
$Sprite.visible = true;
|
||||
$Sprite2.visible = false;
|
||||
$Sprite3.visible = false;
|
||||
elif locale == "uk":
|
||||
$Sprite.visible = false;
|
||||
$Sprite2.visible = false;
|
||||
$Sprite3.visible = true;
|
||||
|
||||
dialogNode = get_tree().root.get_node("Root/Game").get_child(0).get_node("DialogNode");
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
return [
|
||||
"English", "Русский",
|
||||
|
||||
];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == "English":
|
||||
$Sprite.visible = false;
|
||||
$Sprite2.visible = true;
|
||||
$Sprite3.visible = false;
|
||||
elif setting == "Русский":
|
||||
$Sprite.visible = true;
|
||||
$Sprite2.visible = false;
|
||||
$Sprite3.visible = false;
|
||||
elif setting == "Українська":
|
||||
$Sprite.visible = false;
|
||||
$Sprite2.visible = false;
|
||||
$Sprite3.visible = true;
|
||||
|
||||
func _on_TextureButton_pressed():
|
||||
if dialogNode != null and not buttonpressed:
|
||||
|
||||
buttonpressed = true
|
||||
Dialogic.change_timeline("Timeline_EasterZakviel")
|
||||
|
||||
|
||||
func _on_TextureButton_mouse_entered():
|
||||
if get_tree().root.get_node("Root/Game").get_child_count() != 0:
|
||||
dialogNode.catOnHover = true;
|
||||
|
||||
|
||||
func _on_TextureButton_mouse_exited():
|
||||
if get_tree().root.get_node("Root/Game").get_child_count() != 0:
|
||||
dialogNode.catOnHover = false;
|
36
scripts/backround_scenes_scripts/Stairs.gd
Normal file
36
scripts/backround_scenes_scripts/Stairs.gd
Normal file
|
@ -0,0 +1,36 @@
|
|||
extends Node2D
|
||||
const tweenTime = 1.2
|
||||
const waitTime = 0.6
|
||||
const startZoom = Vector2(0.6, 0.6)
|
||||
const step1Zoom = Vector2(0.7, 0.7)
|
||||
const step2Zoom = Vector2(0.8, 0.8)
|
||||
const step3Zoom = Vector2(0.9, 0.9)
|
||||
const endZoom = Vector2(1.0, 1.0)
|
||||
const start = Vector2(1060, 375)
|
||||
const step1 = Vector2(1035, 416)
|
||||
const step2 = Vector2(1010, 457)
|
||||
const step3 = Vector2(985, 498)
|
||||
const end = Vector2(960, 540)
|
||||
|
||||
func _ready():
|
||||
yield (get_tree().create_timer(0.7), "timeout")
|
||||
$Tween.interpolate_property($Camera2D, "offset", start, step1, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.interpolate_property($Camera2D, "zoom", startZoom, step1Zoom, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.start()
|
||||
yield ($Tween, "tween_all_completed")
|
||||
yield (get_tree().create_timer(waitTime), "timeout")
|
||||
$Tween.interpolate_property($Camera2D, "offset", step1, step2, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.interpolate_property($Camera2D, "zoom", step1Zoom, step2Zoom, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.start()
|
||||
yield ($Tween, "tween_all_completed")
|
||||
yield (get_tree().create_timer(waitTime), "timeout")
|
||||
$Tween.interpolate_property($Camera2D, "offset", step2, step3, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.interpolate_property($Camera2D, "zoom", step2Zoom, step3Zoom, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.start()
|
||||
yield ($Tween, "tween_all_completed")
|
||||
yield (get_tree().create_timer(waitTime), "timeout")
|
||||
$Tween.interpolate_property($Camera2D, "offset", step3, end, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.interpolate_property($Camera2D, "zoom", step3Zoom, endZoom, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.start()
|
||||
|
||||
|
316
scripts/backround_scenes_scripts/Stol.gd
Normal file
316
scripts/backround_scenes_scripts/Stol.gd
Normal file
|
@ -0,0 +1,316 @@
|
|||
extends Node2D
|
||||
|
||||
const nonSpeakColor = Color(0.5, 0.5, 0.5, 1)
|
||||
const nonVisibleColor = Color(0.5, 0.5, 0.5, 0)
|
||||
|
||||
var aliveNotVisible = []
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
if Dialogic.get_variable("SleepingBlue") == "1":
|
||||
$chars / Blue_F.texture = load("res://resources/graphics/backgrounds/stol/sleeping blue.webp")
|
||||
else :
|
||||
$chars / Blue_F.texture = load("res://resources/graphics/backgrounds/stol/1 11 (13) синяя 1.webp")
|
||||
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddBackground("Stol")
|
||||
|
||||
if int(Dialogic.get_variable("Food")) == 0:
|
||||
$NoFood.visible = true
|
||||
if int(Dialogic.get_variable("Is_White_Dead")) == 0:
|
||||
aliveNotVisible.push_back("White")
|
||||
if int(Dialogic.get_variable("Is_Gray_Dead")) == 0:
|
||||
aliveNotVisible.push_back("Gray")
|
||||
if int(Dialogic.get_variable("Is_Pink_Dead")) == 0:
|
||||
aliveNotVisible.push_back("Pink")
|
||||
if int(Dialogic.get_variable("Is_Yellow_Dead")) == 0:
|
||||
aliveNotVisible.push_back("Yellow")
|
||||
if int(Dialogic.get_variable("Is_Orange_Dead")) == 0:
|
||||
aliveNotVisible.push_back("Orange")
|
||||
if int(Dialogic.get_variable("Is_Black_Dead")) == 0:
|
||||
aliveNotVisible.push_back("Black")
|
||||
if int(Dialogic.get_variable("Is_Red_Dead")) == 0:
|
||||
aliveNotVisible.push_back("Red")
|
||||
if int(Dialogic.get_variable("Is_Blue_M_Dead")) == 0:
|
||||
aliveNotVisible.push_back("Blue_M")
|
||||
if int(Dialogic.get_variable("Is_Blue_F_Dead")) == 0:
|
||||
aliveNotVisible.push_back("Blue_F")
|
||||
if int(Dialogic.get_variable("Is_Purple_Dead")) == 0:
|
||||
aliveNotVisible.push_back("Purple")
|
||||
if int(Dialogic.get_variable("Is_Green_Dead")) == 0:
|
||||
aliveNotVisible.push_back("Green")
|
||||
|
||||
if int(Dialogic.get_variable("White_on")) == 1:
|
||||
$chars / White.visible = true
|
||||
if int(Dialogic.get_variable("Red_on")) == 1:
|
||||
$chars / Red.visible = true
|
||||
if int(Dialogic.get_variable("Blue_F_on")) == 1:
|
||||
$chars / Blue_F.visible = true
|
||||
if int(Dialogic.get_variable("Pink_on")) == 1:
|
||||
$chars / Pink.visible = true
|
||||
if int(Dialogic.get_variable("Black_on")) == 1:
|
||||
$chars / Black.visible = true
|
||||
if int(Dialogic.get_variable("Purple_on")) == 1:
|
||||
$chars / Purple.visible = true
|
||||
if int(Dialogic.get_variable("Green_on")) == 1:
|
||||
$chars / Green.visible = true
|
||||
else :
|
||||
GallerySingleton.AddBackground("Stol_food")
|
||||
$WithFood.visible = true
|
||||
if int(Dialogic.get_variable("Is_White_Dead")) == 0:
|
||||
$chars / White.visible = true
|
||||
if int(Dialogic.get_variable("Is_Gray_Dead")) == 0:
|
||||
$chars / Gray.visible = true
|
||||
if int(Dialogic.get_variable("Is_Pink_Dead")) == 0:
|
||||
$chars / Pink.visible = true
|
||||
if int(Dialogic.get_variable("Is_Yellow_Dead")) == 0:
|
||||
$chars / Yellow.visible = true
|
||||
if int(Dialogic.get_variable("Is_Orange_Dead")) == 0:
|
||||
if int(Dialogic.get_variable("Orange_on")) == 1:
|
||||
$chars / Orange.visible = true
|
||||
if int(Dialogic.get_variable("Is_Black_Dead")) == 0:
|
||||
$chars / Black.visible = true
|
||||
if int(Dialogic.get_variable("Is_Red_Dead")) == 0:
|
||||
$chars / Red.visible = true
|
||||
if int(Dialogic.get_variable("Is_Blue_M_Dead")) == 0:
|
||||
$chars / Blue_M.visible = true
|
||||
if int(Dialogic.get_variable("Is_Blue_F_Dead")) == 0:
|
||||
$chars / Blue_F.visible = true
|
||||
if int(Dialogic.get_variable("Is_Purple_Dead")) == 0:
|
||||
$chars / Purple.visible = true
|
||||
if int(Dialogic.get_variable("Is_Green_Dead")) == 0:
|
||||
$chars / Green.visible = true
|
||||
|
||||
match Dialogic.get_variable("WhoSpeaksStol"):
|
||||
"White":
|
||||
EndSpeech()
|
||||
$chars / White.modulate = Color(1, 1, 1, 1)
|
||||
"Gray":
|
||||
EndSpeech()
|
||||
$chars / Gray.modulate = Color(1, 1, 1, 1)
|
||||
"Pink":
|
||||
EndSpeech()
|
||||
$chars / Pink.modulate = Color(1, 1, 1, 1)
|
||||
"Yellow":
|
||||
EndSpeech()
|
||||
$chars / Yellow.modulate = Color(1, 1, 1, 1)
|
||||
"Orange":
|
||||
EndSpeech()
|
||||
$chars / Orange.modulate = Color(1, 1, 1, 1)
|
||||
"Black":
|
||||
EndSpeech()
|
||||
$chars / Black.modulate = Color(1, 1, 1, 1)
|
||||
"Red":
|
||||
EndSpeech()
|
||||
$chars / Red.modulate = Color(1, 1, 1, 1)
|
||||
"Blue_M":
|
||||
EndSpeech()
|
||||
$chars / Blue_M.modulate = Color(1, 1, 1, 1)
|
||||
"Blue_F":
|
||||
EndSpeech()
|
||||
$chars / Blue_F.modulate = Color(1, 1, 1, 1)
|
||||
"Purple":
|
||||
EndSpeech()
|
||||
$chars / Purple.modulate = Color(1, 1, 1, 1)
|
||||
"Green":
|
||||
EndSpeech()
|
||||
$chars / Green.modulate = Color(1, 1, 1, 1)
|
||||
"None":
|
||||
EndSpeech()
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_food_listener")
|
||||
|
||||
var sfxPath = "res://resources/audio/sfx/zvuk-kamina_zastolom.ogg"
|
||||
get_tree().root.get_node("Root").SetSFXforBGM(sfxPath)
|
||||
|
||||
|
||||
func _food_listener(string):
|
||||
match string:
|
||||
"food_on":
|
||||
Dialogic.set_variable("Orange_on", 1)
|
||||
$WithFood.self_modulate.a = 0.0
|
||||
$WithFood.visible = true
|
||||
var tween = $"Tween"
|
||||
for i in aliveNotVisible:
|
||||
$chars.get_node(i).modulate = nonVisibleColor
|
||||
$chars.get_node(i).visible = true
|
||||
tween.interpolate_property($chars.get_node(i), "modulate", nonVisibleColor, Color(1, 1, 1, 1), 1.0, Tween.TRANS_LINEAR, 0)
|
||||
tween.interpolate_method(self, "SpriteInterpolate", 0, 1, 1.0, Tween.TRANS_LINEAR, 0)
|
||||
tween.start()
|
||||
"White":
|
||||
EndSpeech()
|
||||
$chars / White.modulate = Color(1, 1, 1, 1)
|
||||
Dialogic.set_variable("WhoSpeaksStol", "White")
|
||||
"Gray":
|
||||
EndSpeech()
|
||||
$chars / Gray.modulate = Color(1, 1, 1, 1)
|
||||
Dialogic.set_variable("WhoSpeaksStol", "Gray")
|
||||
"Pink":
|
||||
EndSpeech()
|
||||
$chars / Pink.modulate = Color(1, 1, 1, 1)
|
||||
Dialogic.set_variable("WhoSpeaksStol", "Pink")
|
||||
"Yellow":
|
||||
EndSpeech()
|
||||
$chars / Yellow.modulate = Color(1, 1, 1, 1)
|
||||
Dialogic.set_variable("WhoSpeaksStol", "Yellow")
|
||||
"Orange":
|
||||
EndSpeech()
|
||||
$chars / Orange.modulate = Color(1, 1, 1, 1)
|
||||
Dialogic.set_variable("WhoSpeaksStol", "Orange")
|
||||
"Black":
|
||||
EndSpeech()
|
||||
$chars / Black.modulate = Color(1, 1, 1, 1)
|
||||
Dialogic.set_variable("WhoSpeaksStol", "Black")
|
||||
"Red":
|
||||
EndSpeech()
|
||||
$chars / Red.modulate = Color(1, 1, 1, 1)
|
||||
Dialogic.set_variable("WhoSpeaksStol", "Red")
|
||||
"Blue_M":
|
||||
EndSpeech()
|
||||
$chars / Blue_M.modulate = Color(1, 1, 1, 1)
|
||||
Dialogic.set_variable("WhoSpeaksStol", "Blue_M")
|
||||
"Blue_F":
|
||||
EndSpeech()
|
||||
$chars / Blue_F.modulate = Color(1, 1, 1, 1)
|
||||
Dialogic.set_variable("WhoSpeaksStol", "Blue_F")
|
||||
"Purple":
|
||||
EndSpeech()
|
||||
$chars / Purple.modulate = Color(1, 1, 1, 1)
|
||||
Dialogic.set_variable("WhoSpeaksStol", "Purple")
|
||||
"Green":
|
||||
EndSpeech()
|
||||
$chars / Green.modulate = Color(1, 1, 1, 1)
|
||||
Dialogic.set_variable("WhoSpeaksStol", "Green")
|
||||
"None":
|
||||
EndSpeech()
|
||||
Dialogic.set_variable("WhoSpeaksStol", "None")
|
||||
"Orange_off":
|
||||
$CharTween.interpolate_property($chars / Orange, "modulate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), 0.6, Tween.TRANS_LINEAR, 0)
|
||||
$CharTween.start()
|
||||
Dialogic.set_variable("Orange_on", 0)
|
||||
$Timer.set_wait_time(0.6)
|
||||
$Timer.set_one_shot(true)
|
||||
$Timer.start()
|
||||
yield ($Timer, "timeout")
|
||||
$chars / Orange.visible = false
|
||||
"Orange_on":
|
||||
$chars / Orange.modulate = nonVisibleColor
|
||||
$chars / Orange.visible = true
|
||||
$CharTween.interpolate_property($chars / Orange, "modulate", nonVisibleColor, Color(0.5, 0.5, 0.5, 1), 0.6, Tween.TRANS_LINEAR, 0)
|
||||
$CharTween.start()
|
||||
Dialogic.set_variable("Orange_on", 1)
|
||||
"White_on":
|
||||
$chars / White.modulate = nonVisibleColor
|
||||
$chars / White.visible = true
|
||||
$CharTween.interpolate_property($chars / White, "modulate", nonVisibleColor, Color(0.5, 0.5, 0.5, 1), 0.6, Tween.TRANS_LINEAR, 0)
|
||||
$CharTween.start()
|
||||
aliveNotVisible.erase("White")
|
||||
Dialogic.set_variable("White_on", 1)
|
||||
"Blue_F_on":
|
||||
$chars / Blue_F.modulate = nonVisibleColor
|
||||
$chars / Blue_F.visible = true
|
||||
$CharTween.interpolate_property($chars / Blue_F, "modulate", nonVisibleColor, Color(0.5, 0.5, 0.5, 1), 0.6, Tween.TRANS_LINEAR, 0)
|
||||
$CharTween.start()
|
||||
aliveNotVisible.erase("Blue_F")
|
||||
Dialogic.set_variable("Blue_F_on", 1)
|
||||
"Green_on":
|
||||
$chars / Green.modulate = nonVisibleColor
|
||||
$chars / Green.visible = true
|
||||
$CharTween.interpolate_property($chars / Green, "modulate", nonVisibleColor, Color(0.5, 0.5, 0.5, 1), 0.6, Tween.TRANS_LINEAR, 0)
|
||||
$CharTween.start()
|
||||
aliveNotVisible.erase("Green")
|
||||
Dialogic.set_variable("Green_on", 1)
|
||||
"Black_on":
|
||||
$chars / Black.modulate = nonVisibleColor
|
||||
$chars / Black.visible = true
|
||||
$CharTween.interpolate_property($chars / Black, "modulate", nonVisibleColor, Color(0.5, 0.5, 0.5, 1), 0.6, Tween.TRANS_LINEAR, 0)
|
||||
$CharTween.start()
|
||||
aliveNotVisible.erase("Black")
|
||||
Dialogic.set_variable("Black_on", 1)
|
||||
"Purple_on":
|
||||
$chars / Purple.modulate = nonVisibleColor
|
||||
$chars / Purple.visible = true
|
||||
$CharTween.interpolate_property($chars / Purple, "modulate", nonVisibleColor, Color(0.5, 0.5, 0.5, 1), 0.6, Tween.TRANS_LINEAR, 0)
|
||||
$CharTween.start()
|
||||
aliveNotVisible.erase("Purple")
|
||||
Dialogic.set_variable("Purple_on", 1)
|
||||
"Pink_on":
|
||||
$chars / Pink.modulate = nonVisibleColor
|
||||
$chars / Pink.visible = true
|
||||
$CharTween.interpolate_property($chars / Pink, "modulate", nonVisibleColor, Color(0.5, 0.5, 0.5, 1), 0.6, Tween.TRANS_LINEAR, 0)
|
||||
$CharTween.start()
|
||||
aliveNotVisible.erase("Pink")
|
||||
Dialogic.set_variable("Pink_on", 1)
|
||||
"Red_on":
|
||||
$chars / Red.modulate = nonVisibleColor
|
||||
$chars / Red.visible = true
|
||||
$CharTween.interpolate_property($chars / Red, "modulate", nonVisibleColor, Color(0.5, 0.5, 0.5, 1), 0.6, Tween.TRANS_LINEAR, 0)
|
||||
$CharTween.start()
|
||||
aliveNotVisible.erase("Red")
|
||||
Dialogic.set_variable("Red_on", 1)
|
||||
"wake_up":
|
||||
$chars / Blue_F.texture = load("res://resources/graphics/backgrounds/stol/1 11 (13) синяя 1.webp")
|
||||
|
||||
|
||||
func SpriteInterpolate(value):
|
||||
$WithFood.self_modulate.a = value
|
||||
|
||||
|
||||
func _on_Tween_tween_all_completed():
|
||||
$NoFood.visible = false
|
||||
|
||||
|
||||
func EndSpeech():
|
||||
for i in $chars.get_children():
|
||||
i.modulate = nonSpeakColor
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
call_deferred("FUCKVisibile");
|
||||
|
||||
if not GallerySingleton.HaveBackground("Stol_food"):
|
||||
return [];
|
||||
|
||||
return ["ui_gallery_stol_food", "ui_gallery_stol", "ui_gallery_people"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_gallery_stol_food"):
|
||||
$WithFood.visible = true;
|
||||
$NoFood.visible = false;
|
||||
elif setting == tr("ui_gallery_stol"):
|
||||
$WithFood.visible = false;
|
||||
$NoFood.visible = true;
|
||||
elif setting == tr("ui_gallery_people"):
|
||||
$chars.visible = not $chars.visible;
|
||||
|
||||
|
||||
func FUCKVisibile():
|
||||
yield (get_tree().create_timer(0.2), "timeout");
|
||||
|
||||
$WithFood.visible = true;
|
||||
|
||||
$chars.visible = false;
|
||||
|
||||
for i in $chars.get_children():
|
||||
i.visible = true;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
21
scripts/backround_scenes_scripts/Test.gd
Normal file
21
scripts/backround_scenes_scripts/Test.gd
Normal file
|
@ -0,0 +1,21 @@
|
|||
extends Node2D
|
||||
|
||||
var timeParam
|
||||
var alphaTimeParam
|
||||
var minigameTimer = 40.0
|
||||
const yPosStart = 710
|
||||
const yPosEnd = - 840
|
||||
const alphaStart = 0.3
|
||||
const alphaEnd = 0.8
|
||||
var shaderTransparency
|
||||
|
||||
func _ready():
|
||||
timeParam = (yPosStart - yPosEnd) / minigameTimer
|
||||
alphaTimeParam = (alphaEnd - alphaStart) / minigameTimer
|
||||
|
||||
func _process(delta):
|
||||
if $Node2D / flame.position.y > yPosEnd:
|
||||
$Node2D / flame.position.y -= delta * timeParam
|
||||
shaderTransparency = $Node2D / flame.material.get_shader_param("transparency")
|
||||
if shaderTransparency < alphaEnd:
|
||||
$Node2D / flame.material.set_shader_param("transparency", shaderTransparency + alphaTimeParam * delta)
|
28
scripts/backround_scenes_scripts/Train_video.gd
Normal file
28
scripts/backround_scenes_scripts/Train_video.gd
Normal file
|
@ -0,0 +1,28 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
GallerySingleton.AddBackground("Train_video")
|
||||
|
||||
var videoPlayer = $Video / VideoPlayer
|
||||
var path = ""
|
||||
if TranslationServer.get_locale() == "en":
|
||||
path = "res://resources/video/train_en.ogv"
|
||||
else :
|
||||
path = "res://resources/video/train_ru.ogv"
|
||||
videoPlayer.stream = load(path)
|
||||
videoPlayer.play()
|
||||
|
||||
func InitForGallery()->Array:
|
||||
$Video.scale = Vector2(0.5, 0.5)
|
||||
|
||||
return ["English", "Русский"];
|
||||
|
||||
func SetSettings(setting):
|
||||
var videoPlayer = $Video / VideoPlayer;
|
||||
var path = ""
|
||||
if setting == "English":
|
||||
path = "res://resources/video/train_en.ogv"
|
||||
else :
|
||||
path = "res://resources/video/train_ru.ogv"
|
||||
videoPlayer.stream = load(path)
|
||||
videoPlayer.play()
|
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;
|
44
scripts/backround_scenes_scripts/Vtoroi_etaj.gd
Normal file
44
scripts/backround_scenes_scripts/Vtoroi_etaj.gd
Normal file
|
@ -0,0 +1,44 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddBackground("Vtoroi_etaj")
|
||||
|
||||
if int(Dialogic.get_variable("LightsOn")) == 1:
|
||||
$lightsON.visible = true
|
||||
$lightsOFF.visible = false
|
||||
else :
|
||||
$lightsON.visible = false
|
||||
$lightsOFF.visible = true
|
||||
if get_parent().get_parent().get_node("Game") == null:
|
||||
return
|
||||
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)
|
||||
$lightsON.visible = true
|
||||
$lightsOFF.visible = false
|
||||
"lights_off":
|
||||
Dialogic.set_variable("LightsOn", 0)
|
||||
$lightsON.visible = false
|
||||
$lightsOFF.visible = true
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
$lightsOFF.visible = false;
|
||||
$lightsON.visible = true;
|
||||
|
||||
return ["ui_lights_on", "ui_lights_off"];
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_lights_on"):
|
||||
$lightsON.visible = true;
|
||||
$lightsOFF.visible = false;
|
||||
else :
|
||||
$lightsON.visible = false;
|
||||
$lightsOFF.visible = true;
|
135
scripts/backround_scenes_scripts/Vzriv2.gd
Normal file
135
scripts/backround_scenes_scripts/Vzriv2.gd
Normal file
|
@ -0,0 +1,135 @@
|
|||
extends Node2D
|
||||
|
||||
var folder;
|
||||
const zoomingTime = 2.5
|
||||
|
||||
|
||||
func _ready():
|
||||
var cameraPosition = Dialogic.get_variable("cameraPosition")
|
||||
|
||||
if cameraPosition == "vzriv_zoomed":
|
||||
self.position = Vector2( - 1300, - 150)
|
||||
self.scale = Vector2(1.7, 1.7)
|
||||
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("Vzriv2")
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_emotes_listener")
|
||||
|
||||
if Dialogic.get_variable("5_Wounded_Fire") == "" or Dialogic.get_variable("5_Wounded_Fire") == "none":
|
||||
OS.alert("5_Wounded_Fire ПУСТОЕ!!!");
|
||||
return ;
|
||||
|
||||
folder = Dialogic.get_variable("5_Wounded_Fire");
|
||||
var path = str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Character.webp");
|
||||
|
||||
$Character.texture = load(path);
|
||||
|
||||
var emoteNumber = int(Dialogic.get_variable("Vzriv2emote"))
|
||||
var emote1 = str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Emote2.webp");
|
||||
match emoteNumber:
|
||||
1:
|
||||
emote1 = str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Emote2.webp");
|
||||
2:
|
||||
emote1 = str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Emote1.webp");
|
||||
3:
|
||||
emote1 = str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Emote3.webp");
|
||||
|
||||
$Emote.texture = load(emote1)
|
||||
|
||||
GallerySingleton.AddImage(str("Vzriv2_", folder));
|
||||
|
||||
func _emotes_listener(value):
|
||||
var path = "";
|
||||
match value:
|
||||
"emote1":
|
||||
path = str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Emote2.webp");
|
||||
Dialogic.set_variable("Vzriv2emote", 1)
|
||||
$Emote.texture = load(path)
|
||||
"emote2":
|
||||
path = str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Emote1.webp");
|
||||
Dialogic.set_variable("Vzriv2emote", 2)
|
||||
$Emote.texture = load(path)
|
||||
"emote3":
|
||||
path = str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Emote3.webp");
|
||||
Dialogic.set_variable("Vzriv2emote", 3)
|
||||
$Emote.texture = load(path)
|
||||
"zoom_out":
|
||||
Dialogic.set_variable("cameraPosition", "1")
|
||||
$Tween.remove_all()
|
||||
$Tween.interpolate_property(self, "scale", self.scale, Vector2(1.0, 1.0), zoomingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, Vector2(0, 0), zoomingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
|
||||
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
var amount = 0;
|
||||
var only = "";
|
||||
var names = ["Vzriv2_Gray", "Vzriv2_White", "Vzriv2_Red", "Vzriv2_Blue_M"];
|
||||
var res = [];
|
||||
|
||||
for i in names:
|
||||
var unlocked = GallerySingleton.HaveImage(i);
|
||||
if unlocked:
|
||||
match i:
|
||||
"Vzriv2_Gray":
|
||||
res.push_back("ui_name_gray");
|
||||
"Vzriv2_White":
|
||||
res.push_back("ui_name_white");
|
||||
"Vzriv2_Red":
|
||||
res.push_back("ui_name_red");
|
||||
"Vzriv2_Blue_M":
|
||||
res.push_back("ui_name_blue_m");
|
||||
amount += 1;
|
||||
only = i;
|
||||
|
||||
if amount == 1:
|
||||
folder = "";
|
||||
match only:
|
||||
"Vzriv2_Gray":
|
||||
folder = "Gray";
|
||||
"Vzriv2_White":
|
||||
folder = "White";
|
||||
"Vzriv2_Red":
|
||||
folder = "Red";
|
||||
"Vzriv2_Blue_M":
|
||||
folder = "Blue_M";
|
||||
$Character.texture = load(str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Character.webp"));
|
||||
$Emote.texture = load(str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Emote1.webp"));
|
||||
return ["ui_emote_1", "ui_emote_2", "ui_emote_3"];
|
||||
else :
|
||||
var firstCharacter = tr(res[0]);
|
||||
SetSettings(firstCharacter);
|
||||
|
||||
res.append_array(["ui_emote_1", "ui_emote_2", "ui_emote_3"]);
|
||||
return res;
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_emote_1"):
|
||||
$Emote.texture = load(str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Emote2.webp"));
|
||||
return
|
||||
elif setting == tr("ui_emote_2"):
|
||||
$Emote.texture = load(str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Emote1.webp"));
|
||||
return
|
||||
elif setting == tr("ui_emote_3"):
|
||||
$Emote.texture = load(str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Emote3.webp"));
|
||||
return
|
||||
|
||||
folder = "";
|
||||
if setting == tr("ui_name_blue_m"):
|
||||
folder = "Blue_M";
|
||||
elif setting == tr("ui_name_gray"):
|
||||
folder = "Gray";
|
||||
elif setting == tr("ui_name_red"):
|
||||
folder = "Red";
|
||||
else :
|
||||
folder = "White";
|
||||
|
||||
$Character.texture = load(str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Character.webp"));
|
||||
$Emote.texture = load(str("res://resources/graphics/backgrounds/vzriv2/", folder, "/Emote1.webp"));
|
132
scripts/backround_scenes_scripts/WoundedDead.gd
Normal file
132
scripts/backround_scenes_scripts/WoundedDead.gd
Normal file
|
@ -0,0 +1,132 @@
|
|||
extends Node2D
|
||||
|
||||
const fadingTime = 0.8
|
||||
const zoomingTime = 2.0
|
||||
|
||||
func _ready():
|
||||
var cameraPosition = Dialogic.get_variable("cameraPosition")
|
||||
if cameraPosition == "wounded_zoomed":
|
||||
self.position = Vector2( - 1900, - 150)
|
||||
self.scale = Vector2(2.0, 2.0)
|
||||
|
||||
if not get_tree().root.has_node("Root"):
|
||||
return ;
|
||||
|
||||
GallerySingleton.AddImage("WoundedDead");
|
||||
|
||||
Dialogic.set_variable("Room", "1");
|
||||
|
||||
var boy = Dialogic.get_variable("5_Wounded_Fire")
|
||||
match boy:
|
||||
"Red":
|
||||
$Boy.texture = load("res://resources/graphics/backgrounds/wounded_dead/red.webp")
|
||||
$Poduwka.texture = load("res://resources/graphics/backgrounds/wounded_dead/poduwka_red.webp")
|
||||
GallerySingleton.AddImage("WoundedDead_Red");
|
||||
"White":
|
||||
$Boy.texture = load("res://resources/graphics/backgrounds/wounded_dead/white.webp")
|
||||
$Poduwka.texture = load("res://resources/graphics/backgrounds/wounded_dead/poduwka_white.webp")
|
||||
GallerySingleton.AddImage("WoundedDead_White");
|
||||
"Blue_M":
|
||||
$Boy.texture = load("res://resources/graphics/backgrounds/wounded_dead/blue.webp")
|
||||
$Poduwka.texture = load("res://resources/graphics/backgrounds/wounded_dead/poduwka_blue.webp")
|
||||
GallerySingleton.AddImage("WoundedDead_Blue");
|
||||
"Gray":
|
||||
$Boy.texture = load("res://resources/graphics/backgrounds/wounded_dead/gray.webp")
|
||||
$Poduwka.texture = load("res://resources/graphics/backgrounds/wounded_dead/poduwka_gray.webp")
|
||||
GallerySingleton.AddImage("WoundedDead_Gray");
|
||||
|
||||
if int(Dialogic.get_variable("Poduwka")) == 1:
|
||||
$Poduwka.visible = true
|
||||
else :
|
||||
$Poduwka.visible = false
|
||||
|
||||
var dialogicNode = get_parent().get_parent().get_node("Game").get_child(0).get_child(0)
|
||||
dialogicNode.connect("dialogic_signal", self, "_poduwka_listener")
|
||||
|
||||
|
||||
func _poduwka_listener(string):
|
||||
match string:
|
||||
"podushka_off":
|
||||
Dialogic.set_variable("Poduwka", 0)
|
||||
$Tween.interpolate_property($Poduwka, "modulate", Color(1, 1, 1, 1), Color(1, 1, 1, 0), fadingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
"zoom_out":
|
||||
Dialogic.set_variable("cameraPosition", "1")
|
||||
$Tween.remove_all()
|
||||
$Tween.interpolate_property(self, "scale", self.scale, Vector2(1.0, 1.0), zoomingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.interpolate_property(self, "position", self.position, Vector2(0, 0), zoomingTime, Tween.TRANS_LINEAR, 0)
|
||||
$Tween.start()
|
||||
|
||||
var folder;
|
||||
|
||||
func InitForGallery()->Array:
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
||||
$Poduwka.visible = false;
|
||||
|
||||
var amount = 0;
|
||||
var only = "";
|
||||
var names = ["WoundedDead_Red", "WoundedDead_White", "WoundedDead_Blue", "WoundedDead_Gray"];
|
||||
var res = [];
|
||||
|
||||
for i in names:
|
||||
var unlocked = GallerySingleton.HaveImage(i);
|
||||
if unlocked:
|
||||
match i:
|
||||
"WoundedDead_Red":
|
||||
res.push_back("ui_name_red");
|
||||
"WoundedDead_White":
|
||||
res.push_back("ui_name_white");
|
||||
"WoundedDead_Blue":
|
||||
res.push_back("ui_name_blue_m");
|
||||
"WoundedDead_Gray":
|
||||
res.push_back("ui_name_gray");
|
||||
amount += 1;
|
||||
only = i;
|
||||
|
||||
if amount == 1:
|
||||
var path = "";
|
||||
var pillowPath = "";
|
||||
match only:
|
||||
"WoundedDead_Red":
|
||||
path = "res://resources/graphics/backgrounds/wounded_dead/red.webp";
|
||||
pillowPath = "res://resources/graphics/backgrounds/wounded_dead/poduwka_red.webp";
|
||||
"WoundedDead_White":
|
||||
path = "res://resources/graphics/backgrounds/wounded_dead/white.webp";
|
||||
pillowPath = "res://resources/graphics/backgrounds/wounded_dead/poduwka_white.webp";
|
||||
"WoundedDead_Blue":
|
||||
path = "res://resources/graphics/backgrounds/wounded_dead/blue.webp";
|
||||
pillowPath = "res://resources/graphics/backgrounds/wounded_dead/poduwka_blue.webp";
|
||||
"WoundedDead_Gray":
|
||||
path = "res://resources/graphics/backgrounds/wounded_dead/gray.webp";
|
||||
pillowPath = "res://resources/graphics/backgrounds/wounded_dead/poduwka_gray.webp";
|
||||
$Boy.texture = load(path);
|
||||
$Poduwka.texture = load(pillowPath);
|
||||
return ["ui_pillow"];
|
||||
else :
|
||||
var firstCharacter = tr(res[0]);
|
||||
SetSettings(firstCharacter)
|
||||
res.push_back("ui_pillow");
|
||||
return res;
|
||||
|
||||
func SetSettings(setting):
|
||||
if setting == tr("ui_pillow"):
|
||||
$Poduwka.visible = not $Poduwka.visible;
|
||||
return ;
|
||||
|
||||
var path = "";
|
||||
var pillowPath = "";
|
||||
if setting == tr("ui_name_red"):
|
||||
path = "res://resources/graphics/backgrounds/wounded_dead/red.webp";
|
||||
pillowPath = "res://resources/graphics/backgrounds/wounded_dead/poduwka_red.webp";
|
||||
elif setting == tr("ui_name_white"):
|
||||
path = "res://resources/graphics/backgrounds/wounded_dead/white.webp";
|
||||
pillowPath = "res://resources/graphics/backgrounds/wounded_dead/poduwka_white.webp";
|
||||
elif setting == tr("ui_name_blue_m"):
|
||||
path = "res://resources/graphics/backgrounds/wounded_dead/blue.webp";
|
||||
pillowPath = "res://resources/graphics/backgrounds/wounded_dead/poduwka_blue.webp";
|
||||
else :
|
||||
path = "res://resources/graphics/backgrounds/wounded_dead/gray.webp";
|
||||
pillowPath = "res://resources/graphics/backgrounds/wounded_dead/poduwka_gray.webp";
|
||||
$Boy.texture = load(path);
|
||||
$Poduwka.texture = load(pillowPath);
|
11
scripts/backround_scenes_scripts/police3d.gd
Normal file
11
scripts/backround_scenes_scripts/police3d.gd
Normal file
|
@ -0,0 +1,11 @@
|
|||
extends Spatial
|
||||
|
||||
const rotSpeed = 80.0
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
func _process(delta):
|
||||
$Position3D / wing2.rotation_degrees.z += delta * rotSpeed
|
||||
$Position3D / wing3.rotation_degrees.z += delta * rotSpeed
|
||||
$Position3D / wing4.rotation_degrees.z += delta * rotSpeed
|
Loading…
Add table
Add a link
Reference in a new issue