Exemple #1
0
        public override void PostInit()
        {
            base.PostInit();

            // Setup key contexts
            var inputMan = IoCManager.Resolve <IInputManager>();

            ContentContexts.SetupContexts(inputMan.Contexts);

            IoCManager.Resolve <IGameHud>().Initialize();
            IoCManager.Resolve <IClientNotifyManager>().Initialize();
            IoCManager.Resolve <IClientGameTicker>().Initialize();
            IoCManager.Resolve <IOverlayManager>().AddOverlay(new ParallaxOverlay());
            IoCManager.Resolve <IChatManager>().Initialize();
            IoCManager.Resolve <ISandboxManager>().Initialize();
            IoCManager.Resolve <IClientPreferencesManager>().Initialize();
            IoCManager.Resolve <IItemSlotManager>().Initialize();

            // Fire off into state dependent on launcher or not.
            if (_gameController.LaunchState.FromLauncher)
            {
                _stateManager.RequestStateChange <LauncherConnecting>();
            }
            else
            {
                _stateManager.RequestStateChange <MainScreen>();
            }
        }
Exemple #2
0
        public override void PostInit()
        {
            base.PostInit();

            // Setup key contexts
            var inputMan = IoCManager.Resolve <IInputManager>();

            ContentContexts.SetupContexts(inputMan.Contexts);

            IoCManager.Resolve <IGameHud>().Initialize();
            IoCManager.Resolve <IClientNotifyManager>().Initialize();
            IoCManager.Resolve <IClientGameTicker>().Initialize();
            IoCManager.Resolve <IOverlayManager>().AddOverlay(new ParallaxOverlay());
            IoCManager.Resolve <IChatManager>().Initialize();
            IoCManager.Resolve <ISandboxManager>().Initialize();
            IoCManager.Resolve <IClientPreferencesManager>().Initialize();

            _baseClient.RunLevelChanged += (sender, args) =>
            {
                if (args.NewLevel == ClientRunLevel.Initialize)
                {
                    SwitchToDefaultState(args.OldLevel == ClientRunLevel.Connected ||
                                         args.OldLevel == ClientRunLevel.InGame);
                }
            };

            SwitchToDefaultState();
        }
        public override void PostInit()
        {
            base.PostInit();

            // Setup key contexts
            var inputMan = IoCManager.Resolve <IInputManager>();

            ContentContexts.SetupContexts(inputMan.Contexts);
        }
        public override void PostInit()
        {
            base.PostInit();

            // Setup key contexts
            var inputMan = IoCManager.Resolve <IInputManager>();

            ContentContexts.SetupContexts(inputMan.Contexts);

            IoCManager.Resolve <IClientNotifyManager>().Initialize();
            IoCManager.Resolve <IClientGameTicker>().Initialize();
            IoCManager.Resolve <IOverlayManager>().AddOverlay(new ParallaxOverlay());
        }
Exemple #5
0
        public override void PostInit()
        {
            base.PostInit();

            // Setup key contexts
            var inputMan = IoCManager.Resolve <IInputManager>();

            ContentContexts.SetupContexts(inputMan.Contexts);

            IoCManager.Resolve <IGameHud>().Initialize();
            IoCManager.Resolve <IClientNotifyManager>().Initialize();
            IoCManager.Resolve <IClientGameTicker>().Initialize();

            var overlayMgr = IoCManager.Resolve <IOverlayManager>();

            overlayMgr.AddOverlay(new ParallaxOverlay());
            overlayMgr.AddOverlay(new SingularityOverlay());
            overlayMgr.AddOverlay(new CritOverlay()); //Hopefully we can cut down on this list... don't see why a death overlay needs to be instantiated here.
            overlayMgr.AddOverlay(new CircleMaskOverlay());
            overlayMgr.AddOverlay(new FlashOverlay());
            overlayMgr.AddOverlay(new RadiationPulseOverlay());

            IoCManager.Resolve <IChatManager>().Initialize();
            IoCManager.Resolve <ISandboxManager>().Initialize();
            IoCManager.Resolve <IClientPreferencesManager>().Initialize();
            IoCManager.Resolve <IStationEventManager>().Initialize();
            IoCManager.Resolve <IAdminMenuManager>().Initialize();
            IoCManager.Resolve <EuiManager>().Initialize();
            IoCManager.Resolve <AlertManager>().Initialize();
            IoCManager.Resolve <ActionManager>().Initialize();
            IoCManager.Resolve <IVoteManager>().Initialize();

            _baseClient.RunLevelChanged += (_, args) =>
            {
                if (args.NewLevel == ClientRunLevel.Initialize)
                {
                    SwitchToDefaultState(args.OldLevel == ClientRunLevel.Connected ||
                                         args.OldLevel == ClientRunLevel.InGame);
                }
            };

            // Disable engine-default viewport since we use our own custom viewport control.
            IoCManager.Resolve <IUserInterfaceManager>().MainViewport.Visible = false;

            SwitchToDefaultState();
        }
Exemple #6
0
        public override void PostInit()
        {
            base.PostInit();

            // Setup key contexts
            var inputMan = IoCManager.Resolve <IInputManager>();

            ContentContexts.SetupContexts(inputMan.Contexts);

            IoCManager.Resolve <IGameHud>().Initialize();
            IoCManager.Resolve <IClientNotifyManager>().Initialize();
            IoCManager.Resolve <IClientGameTicker>().Initialize();
            var overlayMgr = IoCManager.Resolve <IOverlayManager>();

            overlayMgr.AddOverlay(new ParallaxOverlay());
            overlayMgr.AddOverlay(new GradientCircleMaskOverlay());
            overlayMgr.AddOverlay(new CircleMaskOverlay());
            overlayMgr.AddOverlay(new FlashOverlay());
            overlayMgr.AddOverlay(new RadiationPulseOverlay());
            IoCManager.Resolve <IChatManager>().Initialize();
            IoCManager.Resolve <ISandboxManager>().Initialize();
            IoCManager.Resolve <IClientPreferencesManager>().Initialize();
            IoCManager.Resolve <IStationEventManager>().Initialize();
            IoCManager.Resolve <IAdminMenuManager>().Initialize();
            IoCManager.Resolve <EuiManager>().Initialize();
            IoCManager.Resolve <AlertManager>().Initialize();
            IoCManager.Resolve <ActionManager>().Initialize();
            IoCManager.Resolve <IVoteManager>().Initialize();

            _baseClient.RunLevelChanged += (sender, args) =>
            {
                if (args.NewLevel == ClientRunLevel.Initialize)
                {
                    SwitchToDefaultState(args.OldLevel == ClientRunLevel.Connected ||
                                         args.OldLevel == ClientRunLevel.InGame);
                }
            };

            SwitchToDefaultState();
        }
        public override void PostInit()
        {
            base.PostInit();

            // Setup key contexts
            var inputMan = IoCManager.Resolve <IInputManager>();

            ContentContexts.SetupContexts(inputMan.Contexts);

            IoCManager.Resolve <IGameHud>().Initialize();
            IoCManager.Resolve <IParallaxManager>().LoadDefaultParallax(); // Have to do this later because prototypes are needed.

            var overlayMgr = IoCManager.Resolve <IOverlayManager>();

            overlayMgr.AddOverlay(new SingularityOverlay());
            overlayMgr.AddOverlay(new FlashOverlay());
            overlayMgr.AddOverlay(new RadiationPulseOverlay());

            IoCManager.Resolve <IChatManager>().Initialize();
            IoCManager.Resolve <IClientPreferencesManager>().Initialize();
            IoCManager.Resolve <EuiManager>().Initialize();
            IoCManager.Resolve <IVoteManager>().Initialize();
            IoCManager.Resolve <IGamePrototypeLoadManager>().Initialize();
            IoCManager.Resolve <NetworkResourceManager>().Initialize();

            _baseClient.RunLevelChanged += (_, args) =>
            {
                if (args.NewLevel == ClientRunLevel.Initialize)
                {
                    SwitchToDefaultState(args.OldLevel == ClientRunLevel.Connected ||
                                         args.OldLevel == ClientRunLevel.InGame);
                }
            };

            // Disable engine-default viewport since we use our own custom viewport control.
            IoCManager.Resolve <IUserInterfaceManager>().MainViewport.Visible = false;

            SwitchToDefaultState();
        }