Initial Android commit
This commit is contained in:
commit
1e2b80c13d
8521 changed files with 231475 additions and 0 deletions
137
scripts/AlternativeChoices/AlternativeChoiceBase.gd
Normal file
137
scripts/AlternativeChoices/AlternativeChoiceBase.gd
Normal file
|
@ -0,0 +1,137 @@
|
|||
extends Node2D
|
||||
|
||||
enum CursorState{Normal, Walk, Talk, Press, Crash};
|
||||
|
||||
onready var root;
|
||||
|
||||
signal endOfChoice;
|
||||
|
||||
var localization = [];
|
||||
var cursorStates = [];
|
||||
|
||||
var isHovering;
|
||||
|
||||
var setLabelsPosition:bool = true;
|
||||
|
||||
onready var arrowCursor = preload("res://resources/cursors/arrow2.webp");
|
||||
onready var dialogCursor = preload("res://resources/cursors/dialog2.webp");
|
||||
onready var zoomCursor = preload("res://resources/cursors/magnifier2.webp");
|
||||
onready var walkCursor = preload("res://resources/cursors/man2.webp");
|
||||
|
||||
onready var crashCursor = preload("res://resources/cursors/crash_cursor.webp");
|
||||
|
||||
func _ready():
|
||||
root = get_tree().root.get_node("Root");
|
||||
|
||||
SetCursorStates();
|
||||
Localization();
|
||||
SetLabels();
|
||||
SetHover();
|
||||
CheckForVariables();
|
||||
|
||||
func Localization():
|
||||
pass
|
||||
|
||||
func SetCursorStates():
|
||||
pass
|
||||
|
||||
func SetLabels():
|
||||
var buttons = $SpriteButtons.get_children();
|
||||
var labels = $Labels.get_children();
|
||||
|
||||
for i in labels.size():
|
||||
var label = labels[i];
|
||||
label.text = tr(localization[i]).trim_suffix(".");
|
||||
|
||||
if setLabelsPosition:
|
||||
label.connect("resized", self, "labelResized", [label, buttons[i]]);
|
||||
|
||||
func labelResized(label, button):
|
||||
var center = button.rect_position + button.rect_size * button.rect_scale / 2.0;
|
||||
label.rect_position = center - label.rect_size / 2.0;
|
||||
AdjustLabels();
|
||||
|
||||
func AdjustLabels():
|
||||
pass
|
||||
|
||||
func SetHover():
|
||||
var buttons = $SpriteButtons.get_children();
|
||||
var labels = $Labels.get_children();
|
||||
|
||||
PreventCursorCrash();
|
||||
|
||||
for i in buttons.size():
|
||||
var button = buttons[i];
|
||||
button.connect("mouse_entered", self, "onButtonHoverOn_sprite", [button, labels[i], cursorStates[i]]);
|
||||
button.connect("mouse_exited", self, "onButtonHoverOff_sprite", [button, labels[i]]);
|
||||
|
||||
|
||||
func PreventCursorCrash():
|
||||
for i in 5:
|
||||
cursorStates.push_back(CursorState.Crash)
|
||||
|
||||
func onButtonHoverOn_sprite(button, label, cursorState):
|
||||
if not (root.isMenuVisible or root.isSaveLoadVisible):
|
||||
UpdateCursor(cursorState);
|
||||
button.material.set_shader_param("mixing", 0.15);
|
||||
label.visible = true;
|
||||
isHovering = true;
|
||||
|
||||
func onButtonHoverOff_sprite(button, label):
|
||||
if not (root.isMenuVisible or root.isSaveLoadVisible):
|
||||
UpdateCursor(CursorState.Normal);
|
||||
button.material.set_shader_param("mixing", 0.0);
|
||||
label.visible = false;
|
||||
isHovering = false;
|
||||
|
||||
func UpdateCursor(state:int):
|
||||
match state:
|
||||
CursorState.Normal:
|
||||
Input.set_custom_mouse_cursor(arrowCursor)
|
||||
CursorState.Talk:
|
||||
Input.set_custom_mouse_cursor(dialogCursor, Input.CURSOR_ARROW, Vector2(19, 19))
|
||||
CursorState.Walk:
|
||||
Input.set_custom_mouse_cursor(walkCursor, Input.CURSOR_ARROW, Vector2(19, 19))
|
||||
CursorState.Press:
|
||||
Input.set_custom_mouse_cursor(zoomCursor, Input.CURSOR_ARROW, Vector2(19, 19))
|
||||
CursorState.Crash:
|
||||
Input.set_custom_mouse_cursor(crashCursor, Input.CURSOR_ARROW, Vector2(19, 19))
|
||||
|
||||
func CheckForVariables():
|
||||
pass;
|
||||
|
||||
func End():
|
||||
UpdateCursor(CursorState.Normal);
|
||||
emit_signal("endOfChoice");
|
||||
|
||||
func CheckHover()->bool:
|
||||
return not (get_tree().root.get_node("Root").isMenuVisible or get_tree().root.get_node("Root").isSaveLoadVisible)
|
||||
|
||||
var shaderValue = 0.0;
|
||||
var tempDelta = 0.0;
|
||||
var isRising;
|
||||
|
||||
func _process(delta):
|
||||
if isHovering:
|
||||
return ;
|
||||
|
||||
tempDelta += delta;
|
||||
if tempDelta > 0.2:
|
||||
tempDelta = 0;
|
||||
|
||||
if shaderValue <= - 0.05:
|
||||
isRising = true
|
||||
|
||||
if shaderValue >= 0.13:
|
||||
isRising = false;
|
||||
|
||||
if isRising:
|
||||
shaderValue += 0.01;
|
||||
else :
|
||||
shaderValue -= 0.01;
|
||||
|
||||
var buttons = $SpriteButtons.get_children();
|
||||
for i in buttons:
|
||||
i.material.set_shader_param("mixing", shaderValue);
|
||||
else :
|
||||
tempDelta += delta;
|
23
scripts/AlternativeChoices/AlternativeChoiceTimeline_0.gd
Normal file
23
scripts/AlternativeChoices/AlternativeChoiceTimeline_0.gd
Normal file
|
@ -0,0 +1,23 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = [""];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Press];
|
||||
|
||||
func CheckForVariables():
|
||||
$Timer.start();
|
||||
$PhonePlayer.play();
|
||||
|
||||
func _on_Orange_button_up():
|
||||
if CheckHover():
|
||||
$PhonePlayer.stop();
|
||||
$Timer.stop();
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "answer");
|
||||
End()
|
||||
|
||||
func _on_Timer_timeout():
|
||||
$PhonePlayer.stop();
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "no_answer");
|
||||
End();
|
35
scripts/AlternativeChoices/AlternativeChoiceTimeline_10.gd
Normal file
35
scripts/AlternativeChoices/AlternativeChoiceTimeline_10.gd
Normal file
|
@ -0,0 +1,35 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "choice12.3", "choice21.1", "choice12.3"];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk, CursorState.Walk, CursorState.Walk, ];
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / LoungeLabel.rect_global_position.y = $Labels / LoungeLabel.rect_global_position.y - 10;
|
||||
$Labels / GoBackLabel.rect_global_position.y = $Labels / GoBackLabel.rect_global_position.y - 25;
|
||||
$Labels / GarageLabel.rect_global_position.y = $Labels / GarageLabel.rect_global_position.y - 25;
|
||||
|
||||
func _on_Door_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "25.fakedoor");
|
||||
End()
|
||||
|
||||
func _on_GoBack_button_up():
|
||||
if not CheckHover():return ;
|
||||
if int(Dialogic.get_variable("Time")) >= 45:
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "25.time");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "25.2");
|
||||
End()
|
||||
|
||||
func _on_Lounge_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "25.lounge");
|
||||
End()
|
||||
|
||||
func _on_Garage_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "25.garage");
|
||||
End()
|
224
scripts/AlternativeChoices/AlternativeChoiceTimeline_120.gd
Normal file
224
scripts/AlternativeChoices/AlternativeChoiceTimeline_120.gd
Normal file
|
@ -0,0 +1,224 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
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 Localization():
|
||||
localization = ["", "choice22.8", "", "", "", "", "", "", "", "", "choice22.4", "choice22.5", "choice22.6", ];
|
||||
|
||||
func AdjustLabels():
|
||||
var goOutside = get_node("Labels/2");
|
||||
goOutside.rect_global_position = Vector2(goOutside.rect_global_position.x - 10, goOutside.rect_global_position.y - 10);
|
||||
get_node("Labels/11").rect_global_position.y = get_node("Labels/11").rect_global_position.y - 20;
|
||||
get_node("Labels/12").rect_global_position.y = get_node("Labels/12").rect_global_position.y - 20;
|
||||
get_node("Labels/13").rect_global_position.y = 950;
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk, CursorState.Talk, CursorState.Talk, CursorState.Talk, CursorState.Talk, CursorState.Talk, CursorState.Talk, CursorState.Talk, CursorState.Talk, CursorState.Walk, CursorState.Walk, CursorState.Walk, ];
|
||||
|
||||
func CheckForVariables():
|
||||
get_node("SpriteButtons/Amanda").visible = s("Is_Pink_Dead") and s("Timeline121_a");
|
||||
|
||||
get_node("SpriteButtons/White").visible = s("Is_White_Dead")
|
||||
get_node("SpriteButtons/Robert").visible = s("Is_Gray_Dead")
|
||||
get_node("SpriteButtons/Red").visible = s("Is_Red_Dead")
|
||||
get_node("SpriteButtons/Blue_M").visible = s("Is_Blue_M_Dead")
|
||||
get_node("SpriteButtons/Black").visible = s("Is_Black_Dead")
|
||||
get_node("SpriteButtons/Green").visible = s("Is_Green_Dead")
|
||||
get_node("SpriteButtons/Dana").visible = s("Is_Purple_Dead")
|
||||
|
||||
if Dialogic.get_variable("LightsOn") == "0":
|
||||
$SpriteButtons / Garage.texture_normal = load("res://resources/AlternativeChoices/Timeline_120/Door_night.webp");
|
||||
|
||||
var xPos = int(Dialogic.get_variable("PanoramaPosition"));
|
||||
$SpriteButtons.position.x = xPos;
|
||||
$Labels.position.x = xPos;
|
||||
|
||||
|
||||
func s(variable:String)->bool:
|
||||
return Dialogic.get_variable(variable) == "0";
|
||||
|
||||
func _on_1_button_up():
|
||||
if not CheckHover():return ;
|
||||
if s("Timeline121_a"):
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "121_a");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "girls");
|
||||
End()
|
||||
|
||||
func _on_2_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "121");
|
||||
End()
|
||||
|
||||
func _on_3_button_up():
|
||||
if not CheckHover():return ;
|
||||
if s("Timeline122"):
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "122");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "boys");
|
||||
End()
|
||||
|
||||
func _on_4_button_up():
|
||||
if not CheckHover():return ;
|
||||
if s("Timeline123"):
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "123");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "boys");
|
||||
End()
|
||||
|
||||
func _on_5_button_up():
|
||||
if not CheckHover():return ;
|
||||
if s("Timeline124"):
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "124");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "boys");
|
||||
End()
|
||||
|
||||
func _on_6_button_up():
|
||||
if not CheckHover():return ;
|
||||
if s("Timeline125"):
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "125");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "boys");
|
||||
End()
|
||||
|
||||
func _on_7_button_up():
|
||||
if not CheckHover():return ;
|
||||
if s("Timeline126"):
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "126");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "girls");
|
||||
End()
|
||||
|
||||
func _on_8_button_up():
|
||||
if not CheckHover():return ;
|
||||
if s("Timeline127"):
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "127");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "girls");
|
||||
End()
|
||||
|
||||
func _on_9_button_up():
|
||||
if not CheckHover():return ;
|
||||
if s("Timeline128"):
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "128");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "girls");
|
||||
End()
|
||||
|
||||
func _on_Kitchen_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "120_r");
|
||||
End()
|
||||
|
||||
func _on_Garage_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "120_h");
|
||||
End()
|
||||
|
||||
func _on_13_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "stairs");
|
||||
End()
|
||||
|
||||
func _on_Basement_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "120_basement");
|
||||
End()
|
||||
|
||||
func _on_LeftMove_mouse_entered():
|
||||
if get_tree().root.get_node("Root/Background/Panorama").position.x < 0:
|
||||
Input.set_custom_mouse_cursor(cursorLeft)
|
||||
movingLeft = true
|
||||
$WalkingEffect.play()
|
||||
|
||||
func _on_LeftMove_mouse_exited():
|
||||
Input.set_custom_mouse_cursor(arrowCursor)
|
||||
movingLeft = false
|
||||
Dialogic.set_variable("PanoramaPosition", get_tree().root.get_node("Root/Background/Panorama").position.x)
|
||||
$WalkingEffect.stop()
|
||||
|
||||
func _on_RightMove_mouse_entered():
|
||||
if get_tree().root.get_node("Root/Background/Panorama").position.x > edgePosition:
|
||||
Input.set_custom_mouse_cursor(cursorRight, 0, Vector2(50, 0))
|
||||
movingRight = true
|
||||
$WalkingEffect.play()
|
||||
|
||||
func _on_RightMove_mouse_exited():
|
||||
Input.set_custom_mouse_cursor(arrowCursor)
|
||||
movingRight = false
|
||||
Dialogic.set_variable("PanoramaPosition", get_tree().root.get_node("Root/Background/Panorama").position.x)
|
||||
$WalkingEffect.stop()
|
||||
|
||||
func _process(delta):
|
||||
if not get_tree().root.has_node("Root/Background/Panorama"):
|
||||
return ;
|
||||
|
||||
if get_tree().root.get_node("Root/Background/Panorama").position.x == 0:
|
||||
if $MovingControls / LeftMove.visible:
|
||||
$MovingControls / LeftMove.visible = false;
|
||||
_on_LeftMove_mouse_exited();
|
||||
elif get_tree().root.get_node("Root/Background/Panorama").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:
|
||||
$SpriteButtons.position.x += delta * movingSpeed
|
||||
$Labels.position.x += delta * movingSpeed
|
||||
|
||||
var back = get_tree().root.get_node("Root/Background/Panorama");
|
||||
back.position.x += delta * movingSpeed
|
||||
back.UpdateContainerSound(back.position.x);
|
||||
if back.position.x > 0:
|
||||
back.position.x = 0
|
||||
$SpriteButtons.position.x = 0
|
||||
$Labels.position.x = 0
|
||||
movingLeft = false
|
||||
elif movingRight:
|
||||
$SpriteButtons.position.x -= delta * movingSpeed
|
||||
$Labels.position.x -= delta * movingSpeed
|
||||
|
||||
var back = get_tree().root.get_node("Root/Background/Panorama");
|
||||
back.position.x -= delta * movingSpeed
|
||||
back.UpdateContainerSound(back.position.x);
|
||||
if back.position.x < edgePosition:
|
||||
back.position.x = edgePosition
|
||||
$SpriteButtons.position.x = edgePosition
|
||||
$Labels.position.x = edgePosition
|
||||
movingRight = false
|
||||
|
||||
if isHovering:
|
||||
return ;
|
||||
|
||||
tempDelta += delta;
|
||||
if tempDelta > 0.2:
|
||||
tempDelta = 0;
|
||||
|
||||
if shaderValue <= - 0.05:
|
||||
isRising = true
|
||||
|
||||
if shaderValue >= 0.13:
|
||||
isRising = false;
|
||||
|
||||
if isRising:
|
||||
shaderValue += 0.01;
|
||||
else :
|
||||
shaderValue -= 0.01;
|
||||
|
||||
var buttons = $SpriteButtons.get_children();
|
||||
for i in buttons:
|
||||
i.material.set_shader_param("mixing", shaderValue);
|
||||
else :
|
||||
tempDelta += delta;
|
|
@ -0,0 +1,15 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["choice21.8"]
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, ];
|
||||
|
||||
func AdjustLabels():
|
||||
get_node("Labels/1").rect_global_position.y = 140;
|
||||
|
||||
func _on_Back_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "back");
|
||||
End()
|
|
@ -0,0 +1,35 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "choice21.1", "choice12.3", ""]
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk, CursorState.Walk, CursorState.Walk];
|
||||
|
||||
func CheckForVariables():
|
||||
if Dialogic.get_variable("LightsOn") == "0":
|
||||
$SpriteButtons / Door.texture_normal = load("res://resources/AlternativeChoices/Timeline_32/door_night_lightsOff.webp");
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / Arrow.rect_global_position.y = 625;
|
||||
$Labels / Arrow2.rect_global_position.y = 675;
|
||||
|
||||
func _on_Door_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "120_w_inside");
|
||||
End()
|
||||
|
||||
func _on_ArrowSmoking_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "120_w_smoking");
|
||||
End()
|
||||
|
||||
func _on_ArrowGarage_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "120_w_garage");
|
||||
End()
|
||||
|
||||
func _on_LightHouse_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "120_w_lighthouse");
|
||||
End()
|
|
@ -0,0 +1,35 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["choice21.9", "choice22.1", "", "choice22.11"]
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk, CursorState.Talk, CursorState.Press, ];
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / ArrowLabel.rect_global_position = Vector2(10, 600);
|
||||
$Labels / ArrowLabel2.rect_global_position.y = 600;
|
||||
|
||||
func CheckForVariables():
|
||||
$SpriteButtons / Blue.visible = Dialogic.get_variable("Timeline121") == "0" and Dialogic.get_variable("Killer") != "Blue";
|
||||
$SpriteButtons / Body.visible = Dialogic.get_variable("Timeline106") == "0";
|
||||
|
||||
func _on_ArrowFront_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "120_w_front");
|
||||
End()
|
||||
|
||||
func _on_ArrowGarage_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "120_w_garage");
|
||||
End()
|
||||
|
||||
func _on_Blue_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "120_smoking_blue");
|
||||
End()
|
||||
|
||||
func _on_Body_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "120_smoking_body");
|
||||
End()
|
174
scripts/AlternativeChoices/AlternativeChoiceTimeline_140.gd
Normal file
174
scripts/AlternativeChoices/AlternativeChoiceTimeline_140.gd
Normal file
|
@ -0,0 +1,174 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
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 Localization():
|
||||
localization = ["", "", "", "choice22.8", "choice22.6", "choice22.5", "choice22.4"];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Talk, CursorState.Talk, CursorState.Walk, CursorState.Walk, CursorState.Walk, CursorState.Walk, ];
|
||||
|
||||
func AdjustLabels():
|
||||
var goOutside = get_node("Labels/4");
|
||||
goOutside.rect_global_position = Vector2(goOutside.rect_global_position.x - 10, goOutside.rect_global_position.y - 10);
|
||||
get_node("Labels/5").rect_global_position.y = get_node("Labels/5").rect_global_position.y - 35;
|
||||
get_node("Labels/6").rect_global_position.y = get_node("Labels/6").rect_global_position.y - 20;
|
||||
get_node("Labels/7").rect_global_position.y = get_node("Labels/7").rect_global_position.y - 20;
|
||||
|
||||
func CheckForVariables():
|
||||
get_node("SpriteButtons/Red").visible = Dialogic.get_variable("Is_Red_Dead") == "0";
|
||||
get_node("SpriteButtons/White").visible = Dialogic.get_variable("Is_White_Dead") == "0";
|
||||
|
||||
if Dialogic.get_variable("LightsOn") == "0":
|
||||
$SpriteButtons / Garage.texture_normal = load("res://resources/AlternativeChoices/Timeline_120/Door_night.webp");
|
||||
|
||||
var xPos = int(Dialogic.get_variable("PanoramaPosition"));
|
||||
$SpriteButtons.position.x = xPos;
|
||||
$Labels.position.x = xPos;
|
||||
|
||||
|
||||
func s(variable:String)->bool:
|
||||
return Dialogic.get_variable(variable) == "0";
|
||||
|
||||
func _on_2_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Timeline144") == "0":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "144");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "boys");
|
||||
End()
|
||||
|
||||
func _on_4_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Timeline142") == "0":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "142");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "boys");
|
||||
End()
|
||||
|
||||
func _on_15_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "141");
|
||||
End()
|
||||
|
||||
func _on_Stairs_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "2nd_floor");
|
||||
End()
|
||||
|
||||
func _on_Garage_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "142_h");
|
||||
End()
|
||||
|
||||
func _on_Basement_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "143");
|
||||
End()
|
||||
|
||||
func _on_Kitchen_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "149");
|
||||
End()
|
||||
|
||||
|
||||
func _on_LeftMove_mouse_entered():
|
||||
if get_tree().root.get_node("Root/Background/Panorama").position.x < 0:
|
||||
Input.set_custom_mouse_cursor(cursorLeft)
|
||||
movingLeft = true
|
||||
$WalkingEffect.play()
|
||||
|
||||
func _on_LeftMove_mouse_exited():
|
||||
Input.set_custom_mouse_cursor(arrowCursor)
|
||||
movingLeft = false
|
||||
Dialogic.set_variable("PanoramaPosition", get_tree().root.get_node("Root/Background/Panorama").position.x)
|
||||
$WalkingEffect.stop()
|
||||
|
||||
func _on_RightMove_mouse_entered():
|
||||
if get_tree().root.get_node("Root/Background/Panorama").position.x > edgePosition:
|
||||
Input.set_custom_mouse_cursor(cursorRight, 0, Vector2(50, 0))
|
||||
movingRight = true
|
||||
$WalkingEffect.play()
|
||||
|
||||
func _on_RightMove_mouse_exited():
|
||||
Input.set_custom_mouse_cursor(arrowCursor)
|
||||
movingRight = false
|
||||
Dialogic.set_variable("PanoramaPosition", get_tree().root.get_node("Root/Background/Panorama").position.x)
|
||||
$WalkingEffect.stop()
|
||||
|
||||
func _process(delta):
|
||||
if not get_tree().root.has_node("Root/Background/Panorama"):
|
||||
return ;
|
||||
|
||||
if get_tree().root.get_node("Root/Background/Panorama").position.x == 0:
|
||||
if $MovingControls / LeftMove.visible:
|
||||
$MovingControls / LeftMove.visible = false;
|
||||
_on_LeftMove_mouse_exited();
|
||||
elif get_tree().root.get_node("Root/Background/Panorama").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:
|
||||
$SpriteButtons.position.x += delta * movingSpeed
|
||||
$Labels.position.x += delta * movingSpeed
|
||||
|
||||
var back = get_tree().root.get_node("Root/Background/Panorama");
|
||||
back.position.x += delta * movingSpeed
|
||||
back.UpdateContainerSound(back.position.x);
|
||||
if back.position.x > 0:
|
||||
back.position.x = 0
|
||||
$SpriteButtons.position.x = 0
|
||||
$Labels.position.x = 0
|
||||
movingLeft = false
|
||||
elif movingRight:
|
||||
$SpriteButtons.position.x -= delta * movingSpeed
|
||||
$Labels.position.x -= delta * movingSpeed
|
||||
|
||||
var back = get_tree().root.get_node("Root/Background/Panorama");
|
||||
back.position.x -= delta * movingSpeed
|
||||
back.UpdateContainerSound(back.position.x);
|
||||
if back.position.x < edgePosition:
|
||||
back.position.x = edgePosition
|
||||
$SpriteButtons.position.x = edgePosition
|
||||
$Labels.position.x = edgePosition
|
||||
movingRight = false
|
||||
|
||||
if isHovering:
|
||||
return ;
|
||||
|
||||
tempDelta += delta;
|
||||
if tempDelta > 0.2:
|
||||
tempDelta = 0;
|
||||
|
||||
if shaderValue <= - 0.05:
|
||||
isRising = true
|
||||
|
||||
if shaderValue >= 0.13:
|
||||
isRising = false;
|
||||
|
||||
if isRising:
|
||||
shaderValue += 0.01;
|
||||
else :
|
||||
shaderValue -= 0.01;
|
||||
|
||||
var buttons = $SpriteButtons.get_children();
|
||||
for i in buttons:
|
||||
i.material.set_shader_param("mixing", shaderValue);
|
||||
else :
|
||||
tempDelta += delta;
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["choice21.2", "choice22.9"];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk];
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / a1.rect_global_position.y = 450;
|
||||
$Labels / a2.rect_global_position.y = 794;
|
||||
|
||||
func _on_Arrow_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "140_lighthouse_back");
|
||||
End()
|
||||
|
||||
func _on_Behind_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "140_lighthouse_behind");
|
||||
End()
|
|
@ -0,0 +1,23 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["choice21.2", "choice22.10"];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Press];
|
||||
|
||||
func CheckForVariables():
|
||||
pass;
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / a1.rect_global_position.y = $Labels / a1.rect_global_position.y - 40;
|
||||
|
||||
func _on_Arrow_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "140_lighthouse_back");
|
||||
End()
|
||||
|
||||
func _on_Cliff_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "140_lighthouse_back_cliff");
|
||||
End()
|
|
@ -0,0 +1,38 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["choice21.9", "choice22.1", "", "choice22.11"]
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / ArrowLabel.rect_global_position = Vector2(10, 600);
|
||||
$Labels / ArrowLabel2.rect_global_position.y = 600;
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk, CursorState.Talk, CursorState.Press, ];
|
||||
|
||||
func CheckForVariables():
|
||||
$SpriteButtons / Blue.visible = Dialogic.get_variable("Timeline141") == "0" and Dialogic.get_variable("Killer") != "Blue";
|
||||
$SpriteButtons / Body.visible = Dialogic.get_variable("Timeline106") == "0";
|
||||
|
||||
func _on_ArrowFront_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "front");
|
||||
End()
|
||||
|
||||
func _on_ArrowGarage_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "garage");
|
||||
End()
|
||||
|
||||
func _on_Blue_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Timeline141") == "1":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "141_2");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "141_1");
|
||||
End()
|
||||
|
||||
func _on_Body_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "140_smoking_body");
|
||||
End()
|
108
scripts/AlternativeChoices/AlternativeChoiceTimeline_157_1.gd
Normal file
108
scripts/AlternativeChoices/AlternativeChoiceTimeline_157_1.gd
Normal file
|
@ -0,0 +1,108 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = [tr("ui_sit_near_justin"),
|
||||
tr("ui_sit_near_robert"),
|
||||
tr("ui_sit_near_amanda"),
|
||||
tr("ui_sit_near_henry"),
|
||||
tr("ui_sit_near_renata"),
|
||||
tr("ui_sit_near_linda"),
|
||||
tr("ui_sit_near_alexander"),
|
||||
tr("ui_sit_near_martin"),
|
||||
tr("ui_sit_near_emilia"),
|
||||
tr("ui_sit_near_dana"),
|
||||
tr("ui_sit_near_agatha")];
|
||||
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [];
|
||||
for i in range(0, 11):
|
||||
cursorStates.push_back(CursorState.Talk);
|
||||
|
||||
func CheckForVariables():
|
||||
$SpriteButtons / White.visible = Dialogic.get_variable("Is_White_Dead") == "0";
|
||||
$SpriteButtons / Gray.visible = Dialogic.get_variable("Is_Gray_Dead") == "0";
|
||||
$SpriteButtons / Pink.visible = Dialogic.get_variable("Is_Pink_Dead") == "0";
|
||||
$SpriteButtons / Yellow.visible = Dialogic.get_variable("Is_Yellow_Dead") == "0";
|
||||
$SpriteButtons / Orange.visible = Dialogic.get_variable("Is_Orange_Dead") == "0";
|
||||
$SpriteButtons / Black.visible = Dialogic.get_variable("Is_Black_Dead") == "0";
|
||||
$SpriteButtons / Red.visible = Dialogic.get_variable("Is_Red_Dead") == "0";
|
||||
$SpriteButtons / Blue_M.visible = Dialogic.get_variable("Is_Blue_M_Dead") == "0";
|
||||
$SpriteButtons / Blue_F.visible = Dialogic.get_variable("Is_Blue_F_Dead") == "0";
|
||||
$SpriteButtons / Purple.visible = Dialogic.get_variable("Is_Purple_Dead") == "0";
|
||||
$SpriteButtons / Green.visible = Dialogic.get_variable("Is_Green_Dead") == "0";
|
||||
|
||||
if not $SpriteButtons / Blue_M.visible:
|
||||
return
|
||||
|
||||
if Dialogic.get_variable("SleepingBlue") == "1":
|
||||
$SpriteButtons / Blue_F.texture_normal = load("res://resources/AlternativeChoices/Timeline_157_1/Blue_F_sleeping.webp")
|
||||
$SpriteButtons / Blue_F.rect_position = Vector2(497, 286);
|
||||
|
||||
func AdjustLabels():
|
||||
pass;
|
||||
|
||||
func _on_White_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "boys");
|
||||
End()
|
||||
|
||||
|
||||
func _on_Gray_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "boys");
|
||||
End()
|
||||
|
||||
|
||||
func _on_Pink_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "girls");
|
||||
End()
|
||||
|
||||
|
||||
func _on_Yellow_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "boys");
|
||||
End()
|
||||
|
||||
|
||||
func _on_Orange_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "boys");
|
||||
End()
|
||||
|
||||
|
||||
func _on_Black_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "girls");
|
||||
End()
|
||||
|
||||
|
||||
func _on_Red_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "boys");
|
||||
End()
|
||||
|
||||
|
||||
func _on_Blue_M_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "girls");
|
||||
End()
|
||||
|
||||
|
||||
func _on_Blue_F_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "girls");
|
||||
End()
|
||||
|
||||
|
||||
func _on_Purple_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "girls");
|
||||
End()
|
||||
|
||||
|
||||
func _on_Green_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "boys");
|
||||
End()
|
59
scripts/AlternativeChoices/AlternativeChoiceTimeline_165.gd
Normal file
59
scripts/AlternativeChoices/AlternativeChoiceTimeline_165.gd
Normal file
|
@ -0,0 +1,59 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
var res = ["choice3024.1", "choice3024.2", "choice3024.3"];
|
||||
|
||||
for i in res.size():
|
||||
localization.push_back(str("#", i + 1, " ", tr(res[i])));
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Talk, CursorState.Talk, CursorState.Talk, ];
|
||||
|
||||
func CheckForVariables():
|
||||
|
||||
|
||||
if Dialogic.get_variable("Is_Red_Dead") == "0":
|
||||
$SpriteButtons / Center.texture_normal = load("res://resources/AlternativeChoices/Timeline_165/red.webp");
|
||||
$SpriteButtons / Center.texture_click_mask = load("res://resources/AlternativeChoices/Timeline_165/red_mask.webp");
|
||||
$SpriteButtons / Center.rect_size = Vector2(595, 43);
|
||||
$SpriteButtons / Center.rect_size = Vector2(0.48, 0.48)
|
||||
|
||||
$SpriteButtons / Left.disabled = true;
|
||||
$SpriteButtons / Center.disabled = true;
|
||||
$SpriteButtons / Right.disabled = true;
|
||||
|
||||
$WaitTimer.start(1);
|
||||
|
||||
func _on_WaitTimer_timeout():
|
||||
$SpriteButtons / Left.disabled = false;
|
||||
$SpriteButtons / Center.disabled = false;
|
||||
$SpriteButtons / Right.disabled = false;
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / a1.rect_position = Vector2(20, 700);
|
||||
$Labels / a2.rect_position = Vector2(645, 527);
|
||||
$Labels / a3.rect_position = Vector2(1380, 620);
|
||||
|
||||
|
||||
func _on_Left_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Killer") == "Pink":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "167");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "173");
|
||||
End()
|
||||
|
||||
|
||||
func _on_Center_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "174");
|
||||
End()
|
||||
|
||||
|
||||
func _on_Right_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Killer") == "Blue":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "167");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "173");
|
||||
End()
|
|
@ -0,0 +1,22 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["ui_walk", "ui_walk"]
|
||||
|
||||
func SetCursorStates():
|
||||
|
||||
setLabelsPosition = false;
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk];
|
||||
|
||||
func AdjustLabels():
|
||||
pass
|
||||
|
||||
func _on_Left_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "backward");
|
||||
End()
|
||||
|
||||
func _on_Right_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "forward");
|
||||
End()
|
|
@ -0,0 +1,22 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["ui_walk", "ui_walk"]
|
||||
|
||||
func SetCursorStates():
|
||||
|
||||
setLabelsPosition = false;
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk];
|
||||
|
||||
func AdjustLabels():
|
||||
pass
|
||||
|
||||
func _on_Left_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "forward");
|
||||
End()
|
||||
|
||||
func _on_Right_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "backward");
|
||||
End()
|
|
@ -0,0 +1,22 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["ui_walk", "ui_walk"]
|
||||
|
||||
func SetCursorStates():
|
||||
|
||||
setLabelsPosition = false;
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk, CursorState.Walk, ];
|
||||
|
||||
func AdjustLabels():
|
||||
pass
|
||||
|
||||
func _on_Left_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "backward");
|
||||
End()
|
||||
|
||||
func _on_Right_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "forward");
|
||||
End()
|
27
scripts/AlternativeChoices/AlternativeChoiceTimeline_2.gd
Normal file
27
scripts/AlternativeChoices/AlternativeChoiceTimeline_2.gd
Normal file
|
@ -0,0 +1,27 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "", "", ""];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Talk, CursorState.Talk, CursorState.Press, CursorState.Normal];
|
||||
|
||||
func _on_Orange_button_up():
|
||||
if CheckHover():
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "6.1");
|
||||
End()
|
||||
|
||||
func _on_Yellow_button_up():
|
||||
if CheckHover():
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "6.2");
|
||||
End()
|
||||
|
||||
func _on_Sofa_button_up():
|
||||
if CheckHover():
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "6.3");
|
||||
End()
|
||||
|
||||
func _on_Oldman_button_up():
|
||||
if CheckHover():
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "oldman");
|
||||
End()
|
47
scripts/AlternativeChoices/AlternativeChoiceTimeline_32.gd
Normal file
47
scripts/AlternativeChoices/AlternativeChoiceTimeline_32.gd
Normal file
|
@ -0,0 +1,47 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["choice21.7", "", "choice21.1", "choice21.4", "choice21.5", "choice21.6"];
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / a1.rect_global_position.y = $Labels / a1.rect_global_position.y - 12;
|
||||
$Labels / a3.rect_global_position.y = $Labels / a3.rect_global_position.y - 13;
|
||||
$Labels / a5.rect_global_position.y = 920;
|
||||
$Labels / a6.rect_global_position.y = $Labels / a6.rect_global_position.y - 12;
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk, CursorState.Walk, CursorState.Walk, CursorState.Walk, CursorState.Walk, ];
|
||||
|
||||
func CheckForVariables():
|
||||
if Dialogic.get_variable("LightsOn") == "0":
|
||||
$SpriteButtons / GoBack.texture_normal = load("res://resources/AlternativeChoices/Timeline_32/door_night_lightsOff.webp");
|
||||
|
||||
func _on_Parking_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "190.4");
|
||||
End()
|
||||
|
||||
func _on_GoBack_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "190.6");
|
||||
End()
|
||||
|
||||
func _on_Smoking_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "190.2");
|
||||
End()
|
||||
|
||||
func _on_LightHouse_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "190.3");
|
||||
End()
|
||||
|
||||
func _on_Pristan_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "190.5");
|
||||
End()
|
||||
|
||||
func _on_Ovrag_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "190.1");
|
||||
End()
|
33
scripts/AlternativeChoices/AlternativeChoiceTimeline_3_1.gd
Normal file
33
scripts/AlternativeChoices/AlternativeChoiceTimeline_3_1.gd
Normal file
|
@ -0,0 +1,33 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "", "", ""];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Talk, CursorState.Talk, CursorState.Press, CursorState.Walk];
|
||||
|
||||
func _on_Orange_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Talked_to_Orange") == "0":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "8.4");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "8.orange");
|
||||
End()
|
||||
|
||||
func _on_Yellow_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Talked_to_Yellow") == "0":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "8.2");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "8.yellow");
|
||||
End()
|
||||
|
||||
func _on_Sofa_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "8.3");
|
||||
End()
|
||||
|
||||
func _on_Door_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "8.1");
|
||||
End()
|
67
scripts/AlternativeChoices/AlternativeChoiceTimeline_5.gd
Normal file
67
scripts/AlternativeChoices/AlternativeChoiceTimeline_5.gd
Normal file
|
@ -0,0 +1,67 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["choice12.3", "choice12.7", "choice12.3", "", "choice12.1", "", ""];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk, CursorState.Walk, CursorState.Walk, CursorState.Walk, CursorState.Talk, CursorState.Walk];
|
||||
|
||||
func CheckForVariables():
|
||||
var time = int(Dialogic.get_variable("Time"));
|
||||
|
||||
if time >= 45:
|
||||
var array = [$SpriteButtons / White, $SpriteButtons / LightHouse, $SpriteButtons / Around];
|
||||
for i in array:
|
||||
i.visible = false;
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / a1.rect_global_position = Vector2(12, 675);
|
||||
$Labels / a2.rect_global_position.y = 935;
|
||||
$Labels / AroundLabel.rect_global_position.y = 625;
|
||||
$Labels / a5.rect_global_position.y = 730;
|
||||
|
||||
func _on_a1_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "walk_garage");
|
||||
End()
|
||||
|
||||
func _on_a2_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "walk_sarai");
|
||||
End()
|
||||
|
||||
func _on_Around_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "12.3");
|
||||
End()
|
||||
|
||||
func _on_LightHouse_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "walk_mayak");
|
||||
End()
|
||||
|
||||
func _on_a5_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Talked_to_Gray") == "0":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "12.1");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "12.gray");
|
||||
End()
|
||||
|
||||
func _on_White_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Talked_to_White") == "0":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "12.2");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "12.white");
|
||||
End()
|
||||
|
||||
func _on_Inside_button_up():
|
||||
if not CheckHover():return ;
|
||||
var time = int(Dialogic.get_variable("Time"));
|
||||
|
||||
if time < 45:
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "12.sofa");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "12.4");
|
||||
End()
|
|
@ -0,0 +1,28 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "choice15.3", ""];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk, CursorState.Press];
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / a2.rect_global_position.y = $Labels / a2.rect_global_position.y - 25;
|
||||
|
||||
func CheckForVariables():
|
||||
$SpriteButtons / a2.visible = int(Dialogic.get_variable("Time")) < 45;
|
||||
|
||||
func _on_a1_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "back");
|
||||
End()
|
||||
|
||||
func _on_a2_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "smoking");
|
||||
End()
|
||||
|
||||
func _on_a3_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "text");
|
||||
End()
|
|
@ -0,0 +1,32 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["choice21.2", "", "choice22.9"];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Talk, CursorState.Walk];
|
||||
|
||||
func CheckForVariables():
|
||||
if Dialogic.get_variable("TwinsNPC") == "dog_show":
|
||||
$SpriteButtons / Lady.visible = true;
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / a1.rect_global_position.y = 450;
|
||||
$Labels / a3.rect_global_position.y = 794;
|
||||
|
||||
func _on_Arrow_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "back");
|
||||
End()
|
||||
|
||||
func _on_Lady_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "lady");
|
||||
|
||||
Dialogic.set_variable("TwinsNPC", "");
|
||||
End()
|
||||
|
||||
func _on_Behind_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "behind");
|
||||
End()
|
|
@ -0,0 +1,20 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["choice21.2"];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk];
|
||||
|
||||
func CheckForVariables():
|
||||
|
||||
if Dialogic.get_variable("TwinsNPC") == "dog":
|
||||
Dialogic.set_variable("TwinsNPC", "dog_show");
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / a1.rect_global_position.y = $Labels / a1.rect_global_position.y - 40;
|
||||
|
||||
func _on_Arrow_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "back");
|
||||
End()
|
|
@ -0,0 +1,36 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["choice21.2", "", "", "", ""];
|
||||
|
||||
func SetCursorStates():
|
||||
|
||||
setLabelsPosition = false;
|
||||
cursorStates = [CursorState.Walk, CursorState.Talk, CursorState.Press, CursorState.Press, CursorState.Press, ];
|
||||
|
||||
func CheckForVariables():
|
||||
if Dialogic.get_variable("TwinsNPC") == "fish":
|
||||
$SpriteButtons / Fisher.visible = true;
|
||||
|
||||
func _on_Arrow_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "back");
|
||||
End()
|
||||
|
||||
func _on_Fisher_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("VisitedFisher") == "0":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "ribak");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "ribak_text");
|
||||
End()
|
||||
|
||||
func _on_Yacht_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "yacht");
|
||||
End()
|
||||
|
||||
func _on_Boat_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "lodka");
|
||||
End()
|
|
@ -0,0 +1,24 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["choice21.5", "", "choice22.7"];
|
||||
|
||||
func SetCursorStates():
|
||||
|
||||
setLabelsPosition = false;
|
||||
cursorStates = [CursorState.Walk, CursorState.Press, CursorState.Walk, ];
|
||||
|
||||
func _on_a1_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "walk_pristan");
|
||||
End()
|
||||
|
||||
func _on_door_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "door");
|
||||
End()
|
||||
|
||||
func _on_a3_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "back");
|
||||
End()
|
35
scripts/AlternativeChoices/AlternativeChoiceTimeline_6.gd
Normal file
35
scripts/AlternativeChoices/AlternativeChoiceTimeline_6.gd
Normal file
|
@ -0,0 +1,35 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "", "", ""];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Talk, CursorState.Talk, CursorState.Press, CursorState.Walk, ];
|
||||
|
||||
func _on_Orange_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Talked_to_Orange") == "0":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "13.4");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "13.orange");
|
||||
|
||||
End()
|
||||
|
||||
func _on_Yellow_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Talked_to_Yellow") == "0":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "13.3");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "13.yellow");
|
||||
|
||||
End()
|
||||
|
||||
func _on_Sofa_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "13.2");
|
||||
End()
|
||||
|
||||
func _on_Door_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "13.1");
|
||||
End()
|
19
scripts/AlternativeChoices/AlternativeChoiceTimeline_8.gd
Normal file
19
scripts/AlternativeChoices/AlternativeChoiceTimeline_8.gd
Normal file
|
@ -0,0 +1,19 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["choice21.2"];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, ];
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / Back.rect_global_position.y = 500;
|
||||
|
||||
func _on_Back_button_up():
|
||||
if not CheckHover():return ;
|
||||
var time = int(Dialogic.get_variable("Time"));
|
||||
if time >= 45:
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "20.time");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "20.1");
|
||||
End()
|
35
scripts/AlternativeChoices/AlternativeChoiceTimeline_9.gd
Normal file
35
scripts/AlternativeChoices/AlternativeChoiceTimeline_9.gd
Normal file
|
@ -0,0 +1,35 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["choice21.1", "choice12.3", "", "choice12.3"];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk, CursorState.Walk, CursorState.Walk, ];
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / LoungeLabel.rect_global_position.y = $Labels / LoungeLabel.rect_global_position.y - 10;
|
||||
$Labels / GoBackLabel.rect_global_position.y = $Labels / GoBackLabel.rect_global_position.y - 25;
|
||||
$Labels / GarageLabel.rect_global_position.y = $Labels / GarageLabel.rect_global_position.y - 25;
|
||||
|
||||
func _on_Lounge_button_up():
|
||||
if not CheckHover():return ;
|
||||
if int(Dialogic.get_variable("Talked_to_Blue_and_Red")) == 1:
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "21.lounge");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "21.1");
|
||||
End()
|
||||
|
||||
func _on_GoBack_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "21.2");
|
||||
End()
|
||||
|
||||
func _on_Door_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "21.fakedoor");
|
||||
End()
|
||||
|
||||
func _on_Garage_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "21.garage");
|
||||
End()
|
33
scripts/AlternativeChoices/AlternativeChoiceTimeline_Sofa.gd
Normal file
33
scripts/AlternativeChoices/AlternativeChoiceTimeline_Sofa.gd
Normal file
|
@ -0,0 +1,33 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "", "", ""];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Talk, CursorState.Talk, CursorState.Press, CursorState.Walk, ];
|
||||
|
||||
func _on_Orange_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Talked_to_Orange") == "0":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "127.3");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "127.orange");
|
||||
End()
|
||||
|
||||
func _on_Yellow_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Talked_to_Yellow") == "0":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "127.2");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "127.yellow");
|
||||
End()
|
||||
|
||||
func _on_Sofa_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "127.1");
|
||||
End()
|
||||
|
||||
func _on_Door_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "127.4");
|
||||
End()
|
|
@ -0,0 +1,30 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "choice22.3", ""]
|
||||
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / Back.rect_global_position.y = $Labels / Back.rect_global_position.y - 35;
|
||||
$Labels / Back.rect_global_position.x = $Labels / Back.rect_global_position.x + 20;
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Talk, CursorState.Walk, CursorState.Press];
|
||||
|
||||
func _on_Orange_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("129") == "1":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "129.2");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "129.1");
|
||||
End()
|
||||
|
||||
func _on_Knife_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "129_knife");
|
||||
End()
|
||||
|
||||
func _on_Arrow_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "129_back");
|
||||
End()
|
|
@ -0,0 +1,34 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "choice22.3", "choice21.1", "choice21.9"]
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Talk, CursorState.Walk, CursorState.Walk, CursorState.Walk, ];
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / a1.rect_global_position = Vector2(10, 605);
|
||||
$Labels / a2.rect_global_position.y = 605;
|
||||
|
||||
func _on_Yellow_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("130") == "1":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "130.2");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "130.1");
|
||||
End()
|
||||
|
||||
func _on_Door_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "back");
|
||||
End()
|
||||
|
||||
func _on_ArrowFront_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "120_w_front");
|
||||
End()
|
||||
|
||||
func _on_ArrowSmoking_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "120_w_smoking");
|
||||
End()
|
|
@ -0,0 +1,35 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "choice22.1", "choice21.1", ""]
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk, CursorState.Walk, CursorState.Walk];
|
||||
|
||||
func CheckForVariables():
|
||||
if Dialogic.get_variable("LightsOn") == "0":
|
||||
$SpriteButtons / Door.texture_normal = load("res://resources/AlternativeChoices/Timeline_32/door_night_lightsOff.webp");
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / Arrow.rect_global_position.y = $Labels / Arrow.rect_global_position.y - 25;
|
||||
$Labels / Arrow2.rect_global_position.y = $Labels / Arrow2.rect_global_position.y - 25;
|
||||
|
||||
func _on_Door_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "141_rest");
|
||||
End()
|
||||
|
||||
func _on_ArrowGarage_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "141_garage");
|
||||
End()
|
||||
|
||||
func _on_ArrowSmoking_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "141_smoking");
|
||||
End()
|
||||
|
||||
func _on_LightHouse_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "141_lighthouse");
|
||||
End()
|
|
@ -0,0 +1,43 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "", "", "choice21.9", "choice21.1"]
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Talk, CursorState.Walk, CursorState.Press, CursorState.Walk, CursorState.Walk, CursorState.Walk, ];
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / ArrowLabel.rect_global_position.y = $Labels / ArrowLabel.rect_global_position.y - 25;
|
||||
$Labels / ArrowLabel2.rect_global_position.y = $Labels / ArrowLabel2.rect_global_position.y - 25;
|
||||
|
||||
func CheckForVariables():
|
||||
get_node("SpriteButtons/Yellow").visible = Dialogic.get_variable("Is_Yellow_Dead") == "0";
|
||||
|
||||
func _on_Yellow_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Timeline142_h") == "1":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "142_2");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "142_1");
|
||||
|
||||
End()
|
||||
func _on_Door_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "142_back");
|
||||
End()
|
||||
|
||||
func _on_Car_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "142_car");
|
||||
End()
|
||||
|
||||
func _on_ArrowFront_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "142_3");
|
||||
End()
|
||||
|
||||
func _on_ArrowSmoking_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "142_smoking");
|
||||
End()
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "choice21.8", "", ""]
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Talk, CursorState.Walk, CursorState.Press, CursorState.Press, ];
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / Arrow.rect_global_position.y = $Labels / Arrow.rect_global_position.y - 40;
|
||||
|
||||
func CheckForVariables():
|
||||
get_node("SpriteButtons/Gray").visible = Dialogic.get_variable("Is_Gray_Dead") == "0";
|
||||
|
||||
func _on_Gray_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Timeline143") == "1":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "143_2");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "143_1");
|
||||
End()
|
||||
|
||||
func _on_Arrow_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "143_back");
|
||||
End()
|
||||
|
||||
func _on_Elec_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "143_elec");
|
||||
End()
|
||||
|
||||
func _on_Window_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "143_window");
|
||||
End()
|
|
@ -0,0 +1,37 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "choice22.3", ""]
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Talk, CursorState.Walk, CursorState.Press];
|
||||
|
||||
func AdjustLabels():
|
||||
$Labels / ArrowLabel.rect_global_position.y = $Labels / ArrowLabel.rect_global_position.y - 35;
|
||||
$Labels / ArrowLabel.rect_global_position.x = $Labels / ArrowLabel.rect_global_position.x + 20;
|
||||
|
||||
|
||||
func CheckForVariables():
|
||||
var orange = get_node("SpriteButtons/Orange");
|
||||
orange.visible = Dialogic.get_variable("Is_Orange_Dead") == "0";
|
||||
|
||||
if orange.visible and Dialogic.get_variable("LightsOn"):
|
||||
orange.modulate = Color(0.49, 0.49, 0.49, 1);
|
||||
|
||||
func _on_Orange_button_up():
|
||||
if not CheckHover():return ;
|
||||
if Dialogic.get_variable("Timeline149") == "1":
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "149_2");
|
||||
else :
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "149_1");
|
||||
End()
|
||||
|
||||
func _on_Arrow_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "149_back");
|
||||
End()
|
||||
|
||||
func _on_Knife_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "149_knife");
|
||||
End()
|
|
@ -0,0 +1,57 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "", "1", "2", "choice22.2"];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Walk, CursorState.Walk, CursorState.Walk, CursorState.Walk, ];
|
||||
|
||||
func AdjustLabels():
|
||||
get_node("Labels/Down").rect_position = Vector2(1424, 750);
|
||||
get_node("Labels/Up").rect_position = Vector2(1452, 410);
|
||||
get_node("Labels/1").rect_position = Vector2(300, 240);
|
||||
get_node("Labels/2").rect_position = Vector2(885, 254);
|
||||
get_node("Labels/Office").rect_position = Vector2(1105, 245);
|
||||
|
||||
func CheckForVariables():
|
||||
get_node("SpriteButtons/1").visible = Dialogic.get_variable("Timeline146") == "0";
|
||||
get_node("SpriteButtons/2").visible = Dialogic.get_variable("Timeline147") == "0";
|
||||
|
||||
if get_node("SpriteButtons/1").visible:
|
||||
get_node("SpriteButtons/1").visible = Dialogic.get_variable("Is_Black_Dead") == "0"
|
||||
|
||||
if get_node("SpriteButtons/2").visible:
|
||||
get_node("SpriteButtons/2").visible = Dialogic.get_variable("Is_Green_Dead") == "0"
|
||||
|
||||
if Dialogic.get_variable("LightsOn") == "0":
|
||||
if get_node("SpriteButtons/1").visible:
|
||||
get_node("SpriteButtons/1").texture_normal = load("res://resources/AlternativeChoices/Before_2nd_floor/lightsOff1.webp");
|
||||
if get_node("SpriteButtons/2").visible:
|
||||
get_node("SpriteButtons/2").texture_normal = load("res://resources/AlternativeChoices/Before_2nd_floor/lightsOff2.webp");
|
||||
if $SpriteButtons / Office.visible:
|
||||
$SpriteButtons / Office.texture_normal = load("res://resources/AlternativeChoices/Before_2nd_floor/lightsOffOffice.webp");
|
||||
|
||||
func _on_Down_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "2nd_down");
|
||||
End()
|
||||
|
||||
func _on_Up_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "2nd_up");
|
||||
End()
|
||||
|
||||
func _on_1_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "2nd_1");
|
||||
End()
|
||||
|
||||
func _on_2_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "2nd_2");
|
||||
End()
|
||||
|
||||
func _on_Office_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "2nd_office");
|
||||
End()
|
|
@ -0,0 +1,57 @@
|
|||
extends "res://scripts/AlternativeChoices/AlternativeChoiceBase.gd"
|
||||
|
||||
func Localization():
|
||||
localization = ["", "", "3", "4", "5"];
|
||||
|
||||
func SetCursorStates():
|
||||
cursorStates = [CursorState.Walk, CursorState.Press, CursorState.Walk, CursorState.Walk, CursorState.Walk, ];
|
||||
|
||||
func CheckForVariables():
|
||||
get_node("SpriteButtons/3").visible = Dialogic.get_variable("Timeline145") == "0";
|
||||
get_node("SpriteButtons/4").visible = Dialogic.get_variable("Timeline146_a") == "0";
|
||||
get_node("SpriteButtons/5").visible = Dialogic.get_variable("Timeline148") == "0";
|
||||
|
||||
if get_node("SpriteButtons/3").visible:
|
||||
get_node("SpriteButtons/3").visible = Dialogic.get_variable("Is_Blue_M_Dead") == "0";
|
||||
if get_node("SpriteButtons/5").visible:
|
||||
get_node("SpriteButtons/5").visible = Dialogic.get_variable("Is_Purple_Dead") == "0";
|
||||
|
||||
if Dialogic.get_variable("LightsOn") == "0":
|
||||
if get_node("SpriteButtons/3").visible:
|
||||
get_node("SpriteButtons/3").texture_normal = load("res://resources/AlternativeChoices/Before_3rd_floor/lightsOff3.webp");
|
||||
if get_node("SpriteButtons/4").visible:
|
||||
get_node("SpriteButtons/4").texture_normal = load("res://resources/AlternativeChoices/Before_3rd_floor/lightsOff4.webp");
|
||||
if get_node("SpriteButtons/5").visible:
|
||||
get_node("SpriteButtons/5").texture_normal = load("res://resources/AlternativeChoices/Before_3rd_floor/lightsOff5.webp");
|
||||
get_node("SpriteButtons/Window").texture_normal = load("res://resources/AlternativeChoices/Before_3rd_floor/Window_lightsOff.webp")
|
||||
|
||||
func AdjustLabels():
|
||||
get_node("Labels/Down").rect_position = Vector2(1391, 650);
|
||||
get_node("Labels/3").rect_position = Vector2(300, 240);
|
||||
get_node("Labels/4").rect_position = Vector2(885, 254);
|
||||
get_node("Labels/5").rect_position = Vector2(1143, 245);
|
||||
|
||||
func _on_Down_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "3rd_down");
|
||||
End()
|
||||
|
||||
func _on_Window_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "3rd_window");
|
||||
End()
|
||||
|
||||
func _on_3_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "3rd_3");
|
||||
End()
|
||||
|
||||
func _on_4_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "3rd_4");
|
||||
End()
|
||||
|
||||
func _on_5_button_up():
|
||||
if not CheckHover():return ;
|
||||
Dialogic.set_variable("PreviousTimelineChoice", "3rd_5");
|
||||
End()
|
170
scripts/AlternativeChoices/Timeline_17.gd
Normal file
170
scripts/AlternativeChoices/Timeline_17.gd
Normal file
|
@ -0,0 +1,170 @@
|
|||
extends Node
|
||||
|
||||
var twoGirls;
|
||||
|
||||
signal endOfChoice;
|
||||
|
||||
const imagesBackgroupLoading:String = "res://resources/customControls/Timeline_17_Images/Images.tscn";
|
||||
|
||||
var previousImage:TextureRect = null;
|
||||
var currentImage:TextureRect = null;
|
||||
|
||||
func _ready():
|
||||
PrepareTextures();
|
||||
Localization();
|
||||
SetHover()
|
||||
ChechVariables();
|
||||
|
||||
func PrepareTextures():
|
||||
var _temp = SceneLoader.connect("on_scene_loaded", self, "LoadTextures")
|
||||
SceneLoader.load_scene(imagesBackgroupLoading);
|
||||
|
||||
func LoadTextures(obj):
|
||||
if obj.path != imagesBackgroupLoading:
|
||||
return ;
|
||||
|
||||
var scene = obj.instance;
|
||||
var array:Array = scene.GetTextures();
|
||||
for i in $Girls.get_child_count():
|
||||
var image:TextureRect = $Girls.get_child(i);
|
||||
image.texture = array[i];
|
||||
scene.queue_free()
|
||||
|
||||
SceneLoader.disconnect("on_scene_loaded", self, "LoadTextures")
|
||||
|
||||
|
||||
var buttons = $Buttons.get_children();
|
||||
for i in buttons:
|
||||
i.disabled = false;
|
||||
|
||||
func Localization():
|
||||
$Buttons / Pink.text = tr("ui_name_pink").to_upper();
|
||||
$Buttons / Purple.text = tr("ui_name_purple").to_upper();
|
||||
$Buttons / Green.text = tr("ui_name_green").to_upper();
|
||||
$Buttons / Black.text = tr("ui_name_black").to_upper();
|
||||
$Buttons / Blue.text = tr("ui_name_blue_f").to_upper();
|
||||
$Buttons / Orange.text = tr("choice109.2").to_upper();
|
||||
$Buttons / Guys.text = tr("choice109.1").to_upper();
|
||||
|
||||
func SetHover():
|
||||
var hover = [
|
||||
{"button":$Buttons / Pink, "texture":$Girls / Pink},
|
||||
{"button":$Buttons / Purple, "texture":$Girls / Purple},
|
||||
{"button":$Buttons / Green, "texture":$Girls / Green},
|
||||
{"button":$Buttons / Black, "texture":$Girls / Black},
|
||||
{"button":$Buttons / Blue, "texture":$Girls / Blue},
|
||||
{"button":$Buttons / Orange, "texture":$Girls / Orange},
|
||||
]
|
||||
|
||||
for i in hover:
|
||||
i["button"].connect("mouse_entered", self, "onButtonHoverOn", [i["button"], i["texture"]]);
|
||||
i["button"].connect("mouse_exited", self, "onButtonHoverOff", [i["button"]]);
|
||||
|
||||
func onButtonHoverOn(button, texture):
|
||||
if not CheckHover():return
|
||||
button.get("custom_fonts/font").outline_color = Color(255, 255, 255, 255);
|
||||
button.set("custom_colors/font_color", Color(0, 0, 0, 255));
|
||||
|
||||
for i in $Girls.get_children():
|
||||
if i == texture:
|
||||
continue;
|
||||
i.modulate = Color(1, 1, 1, 0);
|
||||
|
||||
if currentImage != texture:
|
||||
currentImage = texture;
|
||||
texture.modulate = Color(1, 1, 1, 1);
|
||||
|
||||
if previousImage != texture and previousImage != null:
|
||||
previousImage.modulate = Color(1, 1, 1, 0);
|
||||
|
||||
func onButtonHoverOff(button):
|
||||
if not CheckHover():return
|
||||
button.get("custom_fonts/font").outline_color = Color(0, 0, 0, 255);
|
||||
button.set("custom_colors/font_color", Color(255, 255, 255, 255));
|
||||
|
||||
previousImage = currentImage;
|
||||
|
||||
func _on_Guys_mouse_entered():
|
||||
$Buttons / Guys.get("custom_fonts/font").outline_color = Color(255, 255, 255, 255);
|
||||
$Buttons / Guys.set("custom_colors/font_color", Color(255, 0, 0, 255));
|
||||
|
||||
currentImage = null;
|
||||
previousImage = null;
|
||||
|
||||
for i in $Girls.get_children():
|
||||
i.modulate = Color(1, 1, 1, 0);
|
||||
|
||||
func _on_Guys_mouse_exited():
|
||||
$Buttons / Guys.get("custom_fonts/font").outline_color = Color(0, 0, 0, 255);
|
||||
$Buttons / Guys.set("custom_colors/font_color", Color(255, 255, 255, 255));
|
||||
|
||||
func ChechVariables():
|
||||
twoGirls = int(Dialogic.get_variable("TwoGirls"));
|
||||
|
||||
if twoGirls == 0:
|
||||
|
||||
for i in $Buttons.get_children():
|
||||
i.visible = true;
|
||||
elif twoGirls == 2:
|
||||
|
||||
$Buttons / Pink.visible = int(Dialogic.get_variable("Pink_Karma")) >= 5;
|
||||
$Buttons / Purple.visible = int(Dialogic.get_variable("Purple_Karma")) >= 5;
|
||||
$Buttons / Green.visible = int(Dialogic.get_variable("Green_Karma")) >= 5;
|
||||
$Buttons / Black.visible = int(Dialogic.get_variable("Black_Karma")) >= 5;
|
||||
$Buttons / Blue.visible = int(Dialogic.get_variable("Blue_F_Karma")) >= 5;
|
||||
|
||||
var buttons = $Buttons.get_children();
|
||||
for i in buttons:
|
||||
i.disabled = true;
|
||||
|
||||
func _on_Pink_button_up():
|
||||
if not CheckHover():return
|
||||
Dialogic.set_variable("Chosen_Girl", "Pink");
|
||||
Dialogic.set_variable("ChosenAlibi", "Pink");
|
||||
EndOfChoice();
|
||||
|
||||
func _on_Purple_button_up():
|
||||
if not CheckHover():return
|
||||
Dialogic.set_variable("Chosen_Girl", "Purple");
|
||||
Dialogic.set_variable("ChosenAlibi", "Purple");
|
||||
EndOfChoice();
|
||||
|
||||
func _on_Green_button_up():
|
||||
if not CheckHover():return
|
||||
Dialogic.set_variable("Chosen_Girl", "Green");
|
||||
Dialogic.set_variable("ChosenAlibi", "Green");
|
||||
EndOfChoice();
|
||||
|
||||
func _on_Black_button_up():
|
||||
if not CheckHover():return
|
||||
Dialogic.set_variable("Chosen_Girl", "Black");
|
||||
Dialogic.set_variable("ChosenAlibi", "Black");
|
||||
EndOfChoice();
|
||||
|
||||
func _on_Blue_button_up():
|
||||
if not CheckHover():return
|
||||
Dialogic.set_variable("Chosen_Girl", "Blue");
|
||||
Dialogic.set_variable("ChosenAlibi", "Blue");
|
||||
EndOfChoice();
|
||||
|
||||
func _on_Orange_button_up():
|
||||
if not CheckHover():return
|
||||
Dialogic.set_variable("Chosen_Girl", "Loser");
|
||||
var game = get_tree().root.get_node("Root/GameLogic");
|
||||
game.after17result = "Bar";
|
||||
EndOfChoice();
|
||||
|
||||
func _on_Guys_button_up():
|
||||
if not CheckHover():return
|
||||
Dialogic.set_variable("Chosen_Girl", "Loser");
|
||||
var game = get_tree().root.get_node("Root/GameLogic");
|
||||
game.after17result = "Guys";
|
||||
EndOfChoice();
|
||||
|
||||
func CheckHover()->bool:
|
||||
return not (get_tree().root.get_node("Root").isMenuVisible or get_tree().root.get_node("Root").isSaveLoadVisible)
|
||||
|
||||
func EndOfChoice():
|
||||
emit_signal("endOfChoice");
|
||||
for i in $Girls.get_children():
|
||||
i.queue_free();
|
Loading…
Add table
Add a link
Reference in a new issue