import { assetsOverlay , LoadImages } from "./assets" ; import { NAV } from "./GAME" ; import { setOnline } from "./gamestate" ; import { Gui } from "./gui" ; import { Input } from "./input" ; import { InitGameOver } from "./main-gameover" ; import { SplashScreen } from "./main-splash" ; import { Saver } from "./saver" ; import { InitWorld } from "./world" ; function EntryPoint ( ) { try { setOnline ( localStorage ? true : false ) ; } catch ( ex ) { setOnline ( false ) ; } finally { Setup ( ) ; } } window . onload = EntryPoint ; function Setup ( ) { InitGameOver ( SplashScreen ) ; LoadImages ( ( ) => { assetsOverlay ( ) ; SplashScreen ( ) ; setTimeout ( Gui . Render , 100 ) ; } ) ; InitWorld ( ) ; Gui . Init ( ) ; Saver . Init ( ) ; Input . menuButtons [ 0 ] . Setup ( "Data" , NAV ( ) . DataPrompt , true ) ; Gui . Render ( ) ; }