Login

Fancade Wiki

Updated Fancade Web.md (markdown)

... ...
@@ -208,6 +208,48 @@ setLevel((levelIndex + 1) % count);
208 208
// Get version of the editor script engine
209 209
var version = getVersion();
210 210
211
////////////////////////////////
212
// Fancade Web Beta functions //
213
// play.fancade.com/beta //
214
////////////////////////////////
215
216
// Listen to events
217
setEventListener("block-placed", function(x, y, z) {
218
// Callback function called when a block is placed at (x, y, z)
219
});
220
221
setEventListener("update", function() {
222
// Callback function called each frame (also in play mode)
223
});
224
225
setEventListener("keydown", function(key) {
226
// Callback function called when a key is pressed
227
// The key is a number. See https://www.glfw.org/docs/3.3/group__keys.html for a complete list
228
});
229
230
setEventListener("keyup", function(key) {
231
// Callback function called when a key is released
232
// The key is a number. See https://www.glfw.org/docs/3.3/group__keys.html for a complete list
233
});
234
235
// Check if the game is paused
236
if (isGamePaused()) {
237
238
}
239
240
// Check if Fancade is in play mode
241
if (isGamePlaying()) {
242
// Not in edit mode
243
}
244
245
// Check if a key is down
246
// Key number list: https://www.glfw.org/docs/3.3/group__keys.html
247
if (isKeyDown(265)) {
248
//
249
}
250
251
252
211 253
```
212 254
213 255
Fancade Wiki