protected override void Initialize() { try { base.Initialize(); OnInitialize(); screens = new ScreenManager(this); OnAfterInitialize(); } catch (Exception e) { SAMLog.FatalError("Game::Initialize", e); } }
protected MonoSAMGame() { try { FileHelper.RegisterSystemSecificHandler(StaticBridge.FileHelper); Bridge = StaticBridge; CurrentInst = this; CurrentTime = new SAMTime(); Graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture; CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.InvariantCulture; } catch (Exception e) { SAMLog.FatalError("Game::Constructor", e); } }
protected override void Draw(GameTime gameTime) { try { var time = new SAMTime(gameTime); GameCycleCounter++; CurrentTime = time; screens.Draw(time); base.Draw(gameTime); if (IsInitializationLag) { UpdateInitLag(gameTime); } } catch (Exception e) { SAMLog.FatalError("Game::Draw", e); } }
protected override void Update(GameTime gameTime) { try { var time = new SAMTime(gameTime); UpdateAgents(time); OnUpdate(time); screens.Update(time); Sound.Update(time); gameDispatcher.Work(); base.Update(gameTime); } catch (Exception e) { SAMLog.FatalError("Game::Update", e); } }