add end recap scene

This commit is contained in:
Arnaud Vergnet 2021-04-21 00:03:07 +02:00
parent 7704070814
commit 4cc560cb1c
2 changed files with 43 additions and 0 deletions

32
scenes/EndRecap.gd Normal file
View file

@ -0,0 +1,32 @@
extends Control
var GAUGE_PREFIX = "jauge_"
var RELATIONS_PREFIX = "relation_"
var CHOICES_PREFIX = "choix_"
var gauges_names := ["travail", "education", "financier", "ecologie", "social"]
var relations_names := ["evelyne", "jm"]
var choices_names := ["tel_ouvert"]
var gauges := {}
var relations := {}
var choices := {}
func _ready():
var definitions = Dialogic.get_definitions()
# Get relations and gauges from variables
for d in definitions["variables"]:
for g in gauges_names:
if d["name"] == GAUGE_PREFIX + g:
gauges[g] = d
for r in relations_names:
if d["name"] == RELATIONS_PREFIX + r:
relations[r] = d
for c in choices_names:
if d["name"] == CHOICES_PREFIX + c:
choices[c] = d
print(gauges)
print("--")
print(relations)
print("--")
print(choices)

11
scenes/EndRecap.tscn Normal file
View file

@ -0,0 +1,11 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://scenes/EndRecap.gd" type="Script" id=1]
[node name="EndRecap" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}