Initial Android commit
This commit is contained in:
commit
1e2b80c13d
8521 changed files with 231475 additions and 0 deletions
78
scripts/Investigations/Epilog_minigame.gd
Normal file
78
scripts/Investigations/Epilog_minigame.gd
Normal file
|
@ -0,0 +1,78 @@
|
|||
extends "res://scripts/Investigations/InvestigationBase.gd"
|
||||
|
||||
var descriptions:Array;
|
||||
|
||||
var variables = [
|
||||
"Garage",
|
||||
"Office",
|
||||
"Kamin",
|
||||
"Room",
|
||||
"Smoking",
|
||||
"Kitchen",
|
||||
"Stairs",
|
||||
"Lighthouse",
|
||||
"Cliff",
|
||||
"Parking",
|
||||
"Pristan",
|
||||
"Podval",
|
||||
"Prichal",
|
||||
"Restaurant",
|
||||
"Tropa"
|
||||
];
|
||||
|
||||
func _ready():
|
||||
cluesToFind = 99;
|
||||
|
||||
|
||||
func InitClues():
|
||||
descriptions = [
|
||||
"garage",
|
||||
"office",
|
||||
"kamin",
|
||||
"room",
|
||||
"smoking",
|
||||
"kitchen",
|
||||
"stairs",
|
||||
"lighthouse",
|
||||
"cliff",
|
||||
"parking",
|
||||
"pristan",
|
||||
"podval",
|
||||
"prichal",
|
||||
"restaurant",
|
||||
"tropa",
|
||||
"exit"
|
||||
];
|
||||
|
||||
|
||||
cluesFound = [];
|
||||
|
||||
for i in $Clues.get_children().size():
|
||||
var clue = $Clues.get_child(i) as TextureButton;
|
||||
clue.connect("button_up", self, "onButtonPressed", [clue, i])
|
||||
clue.connect("mouse_entered", self, "onButtonHoverOn", [clue]);
|
||||
clue.connect("mouse_exited", self, "onButtonHoverOff", [clue]);
|
||||
|
||||
ShowImages();
|
||||
|
||||
func ShowImages():
|
||||
var dict = ProgressAchievementsSingleton.CreateEpilogMinigameImages();
|
||||
|
||||
for i in dict:
|
||||
var eName = i["name"].to_lower();
|
||||
var node:TextureButton = get_node(str("Clues/", eName));
|
||||
node.visible = true;
|
||||
|
||||
if i.has("location"):
|
||||
node.rect_position = i["location"] / 2;
|
||||
|
||||
if i["status"] == false:
|
||||
var index = $Clues.get_children().find(node);
|
||||
if index != - 1:
|
||||
descriptions[index] = "closed";
|
||||
|
||||
func onButtonPressed(control, index):
|
||||
if CheckHover():
|
||||
onButtonHoverOff(control)
|
||||
var code = descriptions[index];
|
||||
EndInvestigationLoop(code);
|
Loading…
Add table
Add a link
Reference in a new issue