One_Eleven_Android/scripts/backround_scenes_scripts/Amanda_Suicide.gd
2024-11-10 21:08:51 +03:00

59 lines
1.5 KiB
GDScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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/роз_глок_новый.webm"
else :
path = "res://resources/video/роз_береттаовый.webm"
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/роз_глок_новый.webm"
videoPlayer.stream = load(path)
videoPlayer.play()
return ["ui_gallery_fall_1", "ui_gallery_fall_2"]
elif glock and not beretta:
path = "res://resources/video/роз_глок_новый.webm"
else :
path = "res://resources/video/роз_береттаовый.webm"
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/роз_глок_новый.webm"
elif setting == tr("ui_gallery_fall_2"):
path = "res://resources/video/роз_береттаовый.webm"
videoPlayer.stream = load(path)
videoPlayer.play()