示例#1
0
        protected override void Initialize()
        {
#if SHARP_RAVEN
            try
            {
#endif
            var dir = GetGameDirectory();
            if (!System.IO.Directory.Exists(dir))
            {
                System.IO.Directory.CreateDirectory(dir);
            }
            InitializeLogger();
            Thread.CurrentThread.Name = "Main";
            // Goes before anything else so we can track from the very start.
            GamePerformance.Initialize(this);

            SpriteBatch = new SpriteBatch(GraphicsDevice);
            base.Initialize();
#if SHARP_RAVEN
        }

        catch (Exception exception)
        {
            if (ravenClient != null)
            {
                ravenClient.Capture(new SentryEvent(exception));
            }
            throw;
        }
#endif
        }
示例#2
0
        protected override void Initialize()
        {
            // Goes before anything else so we can track from the very start.
            GamePerformance.Initialize(this);
            // TODO: Find a more appropriate spot for this.
            GameObjectCaching.Initialize();

            SpriteBatch = new SpriteBatch(GraphicsDevice);
            base.Initialize();
        }