public FishGame() { _FishGame = this; base.Content.RootDirectory = "FishResource"; if (File.Exists(base.Content.RootDirectory + ".pkg")) { base.Content = new FishGameContentManager(base.Content.RootDirectory + ".pkg", base.Services); base.Content.RootDirectory = "FishResource"; } }
private static void Main(string[] args) { try { if (((args != null) && (args.Length == 1)) && ((args[0] != null) && (args[0].Length > 0))) { //取第一个参数 string str = args[0]; CheckArg(str); } } catch (Exception) { } try { SenseKeyHelper.IsFullScreen = GameBase._IsFullScreen; SenseKeyHelper.Init(); if (!SenseKeyHelper.GetReady()) { GameBase game = null; try { game = new FishGame(); } catch { if (SenseKeyHelper.dogInited) { //某个计数 ShellHelper.StartCount++; if (ShellHelper.StartCount < 2) { Thread.Sleep(3000); ShellHelper.RunProcess(true, "StartC" + ShellHelper.StartCount); } else { RebootHelper.Reboot(); } } return; } if (game != null) { game.Run(); } } } catch (Exception exception) { string path = "GameErrorInfo.log"; string str3 = null; if (SenseKeyHelper.GetReady()) { str3 = SenseKeyHelper.GetErrorMsg(); } else { str3 = IPlayController.FormatErrorStr("MainGame", exception); } StreamWriter writer = new StreamWriter(path, true); writer.WriteLine(str3); writer.WriteLine(); writer.Close(); } finally { try { SenseKeyHelper.m000031(); } catch { } } }