Ejemplo n.º 1
0
 protected override void OnStart()
 {
     Options.Initialize();
     Global.Initialize();
     Teams.Initialize();
     DuckRig.Initialize();
     Unlocks.Initialize();
     ConnectionStatusUI.Initialize();
     Unlocks.CalculateTreeValues();
     Profiles.Initialize();
     Dialogue.Initialize();
     DuckTitle.Initialize();
     News.Initialize();
     Script.Initialize();
     DuckNews.Initialize();
     VirtualBackground.InitializeBack();
     AmmoType.InitializeTypes();
     DestroyType.InitializeTypes();
     VirtualTransition.Initialize();
     Unlockables.Initialize();
     UIInviteMenu.Initialize();
     LevelGenerator.Initialize();
     DuckFile.CompleteSteamCloudInitializate();
     Main.ResetMatchStuff();
     foreach (Profile profile in Profiles.active)
     {
         profile.RecordPreviousStats();
     }
     Main.editor = new DuckGameEditor();
     foreach (string file in DuckFile.GetFiles(Directory.GetCurrentDirectory(), "*.hat"))
     {
         Team t = Team.Deserialize(file);
         if (t != null)
         {
             Teams.AddExtraTeam(t);
         }
     }
     Main.SetPurchaseDetails(9.99f, "USD");
     if (Main.connectID != 0UL)
     {
         NCSteam.inviteLobbyID = Main.connectID;
         Level.current         = (Level) new JoinServer(Main.connectID);
     }
     else
     {
         Level.current = !MonoMain.noIntro ? (Level) new BIOSScreen() : (!MonoMain.startInEditor ? (Level) new TitleScreen() : (Level)Main.editor);
     }
     this._font = new BitmapFont("biosFont", 8);
     Highlights.StartRound();
 }
 public override void Initialize()
 {
     if (this._text == "INCOMPATIBLE MOD SETUP!")
     {
         this._downloadModsMenu = new UIMenu("MODS REQUIRED!", Layer.HUD.camera.width / 2f, Layer.HUD.camera.height / 2f, 290f, conString: "@SELECT@SELECT");
         this._downloadModsMenu.Add((UIComponent) new UIText("You're missing the mods required", Colors.DGBlue), true);
         this._downloadModsMenu.Add((UIComponent) new UIText("to join this game. Would you", Colors.DGBlue), true);
         this._downloadModsMenu.Add((UIComponent) new UIText("like to automatically subscribe to", Colors.DGBlue), true);
         this._downloadModsMenu.Add((UIComponent) new UIText("all required mods, restart and", Colors.DGBlue), true);
         this._downloadModsMenu.Add((UIComponent) new UIText("join the game?", Colors.DGBlue), true);
         this._downloadModsMenu.Add((UIComponent) new UIText("", Colors.DGBlue), true);
         this._downloadModsMenu.Add((UIComponent) new UIMenuItem("NO!", (UIMenuAction) new UIMenuActionCloseMenu((UIComponent)this._downloadModsMenu)), true);
         this._downloadModsMenu.Add((UIComponent) new UIMenuItem("YES!", (UIMenuAction) new UIMenuActionCloseMenuCallFunction((UIComponent)this._downloadModsMenu, new UIMenuActionCloseMenuCallFunction.Function(UIServerBrowser.SubscribeAndRestart))), true);
         this._downloadModsMenu.Close();
         this._downloadModsMenu.Open();
         MonoMain.pauseMenu = (UIComponent)this._downloadModsMenu;
     }
     DuckNetwork.ClosePauseMenu();
     ConnectionStatusUI.Hide();
     this._startCalled = true;
     HUD.AddCornerMessage(HUDCorner.BottomRight, "@START@CONTINUE");
     base.Initialize();
 }