public static void oldVersion(string filename)
        {
            //a copy of the original code from 0.8 version of the game
            LoadingWorldScreen loadingWorldScreen = SCREEN_MANAGER.get_screen("loadWorld") as LoadingWorldScreen;

            loadingWorldScreen.mode           = LoadScreenType.nuke_load_game;
            loadingWorldScreen.loadSelectName = filename;
            loadingWorldScreen.loadSelectSet  = true;
            SCREEN_MANAGER.goto_screen("loadWorld");
        }
        public static void newVersion(string filename)
        {
            //a copy of the original code from 0.9 version of the game
            LoadingWorldScreen loadingWorldScreen = SCREEN_MANAGER.get_screen("loadWorld") as LoadingWorldScreen;

            loadingWorldScreen.mode           = LoadScreenType.database_continue;
            CHARACTER_DATA.continueFileName   = loadingWorldScreen.loadSelectName;
            loadingWorldScreen.loadSelectName = filename;
            loadingWorldScreen.loadSelectSet  = true;
            SCREEN_MANAGER.goto_screen("loadWorld");
        }
Пример #3
0
 //go to game if both player ready
 //map can be load in two case: first if you are host, you choose map from your computer.
 //If you are't host, you must wait for host load map and send for you
 private void GoToGame()
 {
     if (map != null && is_another_ready && is_this_ready)
     {
         sessiondata     = new SessionData();
         sessiondata.map = new Map();
         sessiondata.map.Clone(Storage.MapData.LoadMap(mapdata));
         sessiondata.gameMode       = GameMode.campaign;
         sessiondata.playerInfos    = new PlayerInfo[2];
         sessiondata.playerInfos[0] = new PlayerInfo(0, Owner.Red);
         sessiondata.playerInfos[1] = new PlayerInfo(1, Owner.Blue);
         if (Player.Instance.isHost)
         {
             ((GameScreen)SCREEN_MANAGER.get_screen("GameScreen")).InitSession(sessiondata, 0);
         }
         else
         {
             ((GameScreen)SCREEN_MANAGER.get_screen("GameScreen")).InitSession(sessiondata, 1);
         }
         SCREEN_MANAGER.goto_screen("GameScreen");
     }
 }