a4f3aff827be440b4176a24d78dcf3ce03d1b4cf
[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
7 function end_level()
8 {
9   play_music("music/leveldone.ogg");
10   Tux.deactivate();
11   wait(6);
12   Effect.fade_out(2);
13   wait(2);
14   Level.finish(true);
15 }
16
17 function levelflip()
18 {
19   Effect.fade_out(1);
20   wait(1);
21   Level.flip_vertically();
22   Effect.fade_in(1);
23 }
24
25 function println(val)
26 {
27         print(val);
28         print("\n");
29 }
30
31 if(! ("state" in this))
32   state <- {};
33