44 lines
610 B
GDScript
44 lines
610 B
GDScript
extends Node
|
|
|
|
onready var _LineNode: LineNode = self.get_node("Line")
|
|
|
|
var _json_structure = {
|
|
"speaker": {
|
|
"id": 5,
|
|
"emotion": "happy"
|
|
},
|
|
"scene": {
|
|
"id": 2
|
|
},
|
|
"dialog": {
|
|
"message": "plop",
|
|
"choices_multiple": [
|
|
{
|
|
"title": "test",
|
|
"conditions": [
|
|
{
|
|
"id": "coucou",
|
|
"value": 5
|
|
}
|
|
],
|
|
"infobox": {
|
|
"text": "info info",
|
|
"conditions": [
|
|
{
|
|
"id": "zzzz",
|
|
"value": 1
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"title": "cc",
|
|
"conditions": []
|
|
}
|
|
|
|
]
|
|
}
|
|
}
|
|
|
|
func _on_Button_pressed():
|
|
_LineNode.set_text(JSON.print(_json_structure))
|