Initial Android commit
This commit is contained in:
commit
1e2b80c13d
8521 changed files with 231475 additions and 0 deletions
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")
|
Loading…
Add table
Add a link
Reference in a new issue