Example #1
0
        /// <summary>
        /// Install the installer at a destination via function.
        /// </summary>
        /// <param name="func"></param>
        /// <returns></returns>
        public InstallBuilder On(Func <Scene, Context, DiContainer, bool> func)
        {
            var ib = new InstallBuilder();

            Builders.Add(ib);
            return(ib.On(func));
        }
Example #2
0
        private InstallBuilder OnGeneric(string destination = null)
        {
            var ib = new InstallBuilder();

            Builders.Add(ib);
            return(ib.On(destination));
        }
Example #3
0
        /// <summary>
        /// Installs an installer.
        /// </summary>
        /// <typeparam name="T">The type of your installer.</typeparam>
        public InstallBuilder Register <T>() where T : IInstaller
        {
            var ib = new InstallBuilder();

            Builders.Add(ib);
            return(ib.Register <T>());
        }
Example #4
0
        /// <summary>
        /// Installs your installer on the menu scene.
        /// </summary>
        /// <typeparam name="T">The type of your installer.</typeparam>
        public InstallBuilder OnMenu <T>() where T : IInstaller
        {
            var ib = new InstallBuilder(typeof(T));

            Builders.Add(ib);
            ib.On <MainSettingsMenuViewControllersInstaller>();
            return(ib);
        }
Example #5
0
        /// <summary>
        /// Install your installer on the app installer (project context), any bindings made here are available throughout the entire game.
        /// </summary>
        /// <typeparam name="T">The type of your installer.</typeparam>
        public InstallBuilder OnApp <T>() where T : IInstaller
        {
            var ib = new InstallBuilder(typeof(T));

            Builders.Add(ib);
            ib.On(typeof(PCAppInit).FullName);
            return(ib);
        }
Example #6
0
        /// <summary>
        /// Installs your installer as the game scene is setting up.
        /// </summary>
        /// <typeparam name="T">The type of your installer.</typeparam>
        /// <param name="onGameSetup">Whether or not the installer is installed along during the game core setup. If your objects depend on beatmap elements like the <see cref="AudioTimeSyncController"/> or <see cref="BeatmapObjectManager"/>, set this to false as they don't exist in setup in multiplayer.</param>
        public InstallBuilder OnGame <T>(bool onGameSetup = true) where T : IInstaller
        {
            var ib = new InstallBuilder(typeof(T));

            Builders.Add(ib);
            ib.On(onGameSetup ? typeof(GameCoreSceneSetup).FullName : typeof(GameplayCoreInstaller).FullName);
            return(ib);
        }
Example #7
0
        /// <summary>
        /// Installs your installer on the game scene.
        /// </summary>
        /// <typeparam name="T">The type of your installer.</typeparam>
        public InstallBuilder OnGame <T>() where T : IInstaller
        {
            var ib = new InstallBuilder(typeof(T));

            Builders.Add(ib);
            ib.On(typeof(GameCoreSceneSetup).FullName);
            return(ib);
        }
Example #8
0
        /// <summary>
        /// Installs your installer on the menu scene.
        /// </summary>
        /// <typeparam name="T">The type of your installer.</typeparam>
        public InstallBuilder OnMenu <T>() where T : IInstaller
        {
            var ib = new InstallBuilder(typeof(T));

            Builders.Add(ib);
            ib.On("Menu");
            return(ib);
        }
Example #9
0
        private string ZenSource(InstallBuilder builder)
        {
            var zenjector = _allZenjectors.FirstOrDefault(x => x.Value.Builders.Contains(builder));

            return(zenjector.Key);
        }