private InstallBuilder OnGeneric(string destination = null) { var ib = new InstallBuilder(); Builders.Add(ib); return(ib.On(destination)); }
/// <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)); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }