-
-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathscript.js
More file actions
executable file
·146 lines (115 loc) · 2.65 KB
/
script.js
File metadata and controls
executable file
·146 lines (115 loc) · 2.65 KB
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
/* global monogatari */
// Define the messages used in the game.
monogatari.action ('message').messages ({
'Help': {
title: 'Help',
subtitle: 'Some useful Links',
body: `
<p><a href='https://developers.monogatari.io/documentation/'>Documentation</a> - Everything you need to know.</p>
<p><a href='https://monogatari.io/demo/'>Demo</a> - A simple Demo.</p>
`
}
});
// Define the notifications used in the game
monogatari.action ('notification').notifications ({
'Welcome': {
title: 'Welcome',
body: 'This is the Monogatari VN Engine',
icon: ''
}
});
// Define the Particles JS Configurations used in the game
monogatari.action ('particles').particles ({
});
// Define the canvas objects used in the game
monogatari.action ('canvas').objects ({
});
// Credits of the people involved in the creation of this awesome game
monogatari.configuration ('credits', {
});
// Define the images that will be available on your game's image gallery
monogatari.assets ('gallery', {
});
// Define the music used in the game.
monogatari.assets ('music', {
});
// Define the voice files used in the game.
monogatari.assets ('voices', {
});
// Define the sounds used in the game.
monogatari.assets ('sounds', {
});
// Define the videos used in the game.
monogatari.assets ('videos', {
});
// Define the images used in the game.
monogatari.assets ('images', {
});
// Define the backgrounds for each scene.
monogatari.assets ('scenes', {
});
// Define the Characters
monogatari.characters ({
'y': {
name: 'Yui',
color: '#5bcaff'
}
});
monogatari.script ({
// The game starts here.
'Start': [
'show scene #f7f6f6 with fadeIn',
'show notification Welcome',
{
'Input': {
'Text': 'What is your name?',
'Validation': function (input) {
return input.trim ().length > 0;
},
'Save': function (input) {
this.storage ({
player: {
name: input
}
});
return true;
},
'Revert': function () {
this.storage ({
player: {
name: ''
}
});
},
'Warning': 'You must enter a name!'
}
},
'y Hi {{player.name}} Welcome to Monogatari!',
{
'Choice': {
'Dialog': 'y Have you already read some documentation?',
'Yes': {
'Text': 'Yes',
'Do': 'jump Yes'
},
'No': {
'Text': 'No',
'Do': 'jump No'
}
}
}
],
'Yes': [
'y Thats awesome!',
'y Then you are ready to go ahead and create an amazing Game!',
'y I can’t wait to see what story you’ll tell!',
'end'
],
'No': [
'y You can do it now.',
'show message Help',
'y Go ahead and create an amazing Game!',
'y I can’t wait to see what story you’ll tell!',
'end'
]
});