protected override void PostInitialize()
        {
            base.PostInitialize();

            originalScreenSize = new Vector2(Screen.width, Screen.height);
            // Initialize log service for notification.
            logToNotifService = new LogToNotificationService()
            {
                NotificationBox = base.notificationBox,
            };
            Logger.Register(logToNotifService);

            // Hook events
            HookEngine();
            HookMusicController();
            HookScreenNavigator();
            HookOverlayNavigator();
            HookMapSelection();
            HookConfigurations();
            HookDownloadStore();
            HookMapManager();
            HookApi();

            // Display splash view.
            if (ShouldShowFirstView)
            {
                screenNavigator.Show <SplashScreen>();
            }
        }
Exemple #2
0
        public void TestDummyLogger()
        {
            LogAssert.ignoreFailingMessages = true;

            var dummy = new DummyLogService();

            Logger.Register(dummy);

            Assert.IsFalse(dummy.LoggedNormal);
            Assert.IsFalse(dummy.LoggedWarning);
            Assert.IsFalse(dummy.LoggedError);

            Logger.Log("AA");
            Logger.LogWarning("BB");
            try
            {
                Logger.LogError("CC");
            }
            catch (Exception) {}

            Assert.IsTrue(dummy.LoggedNormal);
            Assert.IsTrue(dummy.LoggedWarning);
            Assert.IsTrue(dummy.LoggedError);
        }