Updated addon repository URL and improved debug output on download
[supertux.git] / data / scripts / default.nut
1 /**
2  * This script gets loaded into the squirrel root vm in supertux. So functions
3  * and variables you define here can be used in all threads
4  */
5
6 //Create Level table
7 Level <- {
8   finish=Level_finish,
9   spawn=Level_spawn,
10   flip_vertically=Level_flip_vertically,
11   toggle_pause=Level_toggle_pause,
12   edit=Level_edit
13 };
14
15
16 function end_level()
17 {
18   play_music("music/leveldone.ogg");
19   Tux.deactivate();
20   wait(6);
21   Effect.fade_out(2);
22   wait(2);
23   Level.finish(true);
24 }
25
26 function levelflip()
27 {
28   Effect.fade_out(1);
29   wait(1);
30   Level.flip_vertically();
31   Effect.fade_in(1);
32 }
33
34 function println(val)
35 {
36         print(val);
37         print("\n");
38 }
39
40 if(! ("state" in this))
41   state <- {};
42