-
Notifications
You must be signed in to change notification settings - Fork 2
/
dialoguesdatasource.js
151 lines (151 loc) · 3.6 KB
/
dialoguesdatasource.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*
* Don´t like it?
* use jQuery, Prototype, raw XMLHttpRequest, your favorite JS library for it.
*
* @see Dialogues builder tool (http://kibo.github.com/dialoguesBuilder/)
*/
var DIALOGUES_DATA_SOURCE = {
"actors": [
{
"id": 10,
"name": "Ogre"
},
{
"id": 20,
"name": "Player"
}
],
"dialogues": [
{
"id": 10,
"parent": null,
"isChoice": false,
"actor": 10,
"conversant": 20,
"menuText": "",
"dialogueText": "Hi player.",
"conditionsString": "!this.getDialogue().passThrough",
"codeBefore": "",
"codeAfter": "this.getDialogue().passThrough=true",
"outgoingLinks": [
20
]
},
{
"id": 20,
"parent": 10,
"isChoice": false,
"actor": 20,
"conversant": 10,
"menuText": "",
"dialogueText": "Hello.",
"conditionsString": "!this.getDialogue().passThrough",
"codeBefore": "",
"codeAfter": "this.getDialogue().passThrough=true",
"outgoingLinks": [
30
]
},
{
"id": 30,
"parent": 20,
"isChoice": false,
"actor": 10,
"conversant": 20,
"menuText": "",
"dialogueText": "Ask me anything you want",
"conditionsString": "!this.getDialogue().passThrough",
"codeBefore": "",
"codeAfter": "this.getDialogue().passThrough=true",
"outgoingLinks": [
40
]
},
{
"id": 40,
"parent": 30,
"isChoice": true,
"conditionsString": "",
"codeBefore": "",
"codeAfter": "",
"outgoingLinks": [
50,
60,
70
]
},
{
"id": 50,
"parent": 40,
"isChoice": false,
"actor": 20,
"conversant": 10,
"menuText": "Ask about Crafty.",
"dialogueText": "What is Crafty?",
"conditionsString": "!this.getDialogue().passThrough",
"codeBefore": "",
"codeAfter": "this.getDialogue().passThrough=true",
"outgoingLinks": [
51
]
},
{
"id": 51,
"parent": 50,
"isChoice": false,
"actor": 10,
"conversant": 20,
"menuText": "",
"dialogueText": "Crafty is cool Java Script game engine.",
"conditionsString": "",
"codeBefore": "",
"codeAfter": "",
"outgoingLinks": [
40
]
},
{
"id": 60,
"parent": 40,
"isChoice": false,
"actor": 20,
"conversant": 10,
"menuText": "Ask about render technology of Crafty.",
"dialogueText": "What technology is used to render?",
"conditionsString": "!this.getDialogue().passThrough",
"codeBefore": "",
"codeAfter": "this.getDialogue().passThrough=true",
"outgoingLinks": [
61
]
},
{
"id": 61,
"parent": 60,
"isChoice": false,
"actor": 10,
"conversant": 20,
"menuText": "",
"dialogueText": "DOM or Canvas",
"conditionsString": "",
"codeBefore": "",
"codeAfter": "",
"outgoingLinks": [
40
]
},
{
"id": 70,
"parent": 40,
"isChoice": false,
"actor": 20,
"conversant": 10,
"menuText": "Leave",
"dialogueText": "Good bye.",
"conditionsString": "",
"codeBefore": "",
"codeAfter": "",
"outgoingLinks": []
}
]
};