59 lines
1.5 KiB
GDScript
59 lines
1.5 KiB
GDScript
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()
|