X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=data%2Fscripts%2Fdefault.nut;h=86670578ae566cd3405e0dff900fb985c2bae021;hb=18c69f4aa24d496f84a088d60c18b180c293dace;hp=f3a262e030e298bbf5e3458ee700346f83c3841a;hpb=690ac9e5920c8d3dd0a8a14a7bd163eaf52ce689;p=supertux.git diff --git a/data/scripts/default.nut b/data/scripts/default.nut index f3a262e03..86670578a 100644 --- a/data/scripts/default.nut +++ b/data/scripts/default.nut @@ -2,9 +2,20 @@ * This script gets loaded into the squirrel root vm in supertux. So functions * and variables you define here can be used in all threads */ + +//Create Level table +Level <- { + finish=Level_finish, + spawn=Level_spawn, + flip_vertically=Level_flip_vertically, + toggle_pause=Level_toggle_pause, + edit=Level_edit +}; + + function end_level() { - Sound.play_music("music/leveldone.ogg"); + play_music("music/leveldone.ogg"); Tux.deactivate(); wait(6); Effect.fade_out(2); @@ -26,3 +37,6 @@ function println(val) print("\n"); } +if(! ("state" in this)) + state <- {}; +