public override void OnInstallingContent() { _container = new GameObject(REX_OBJECT_NAME); var tinyZoneBlockCreators = new[] { Alley2LBuilder.NAME, Oneway1LBuilder.NAME, Oneway1LParkingBuilder.NAME, Oneway1LBicycleBuilder.NAME, ZonablePedestrianTinyGravelRoadBuilder.NAME, ZonablePedestrianTinyPavedRoadBuilder.NAME, ZonablePedestrianTinyStoneRoadBuilder.NAME, ZonablePedestrianTinyBoardwalkBuilder.NAME }; foreach (var name in tinyZoneBlockCreators) { RoadZoneBlocksCreationManager.RegisterCustomCreator <TinyRoadZoneBlocksCreator>(name); RoadSnappingModeManager.RegisterCustomSnapping <TinyRoadSnappingMode>(name); } _menuInstaller = _container.AddInstallerComponent <MenuInstaller>(); _menuInstaller.Host = this; _roadsInstaller = _container.AddInstallerComponent <RoadsInstaller>(); _roadsInstaller.Host = this; }
public override void OnReleased() { base.OnReleased(); if (_menuInstaller != null) { Object.Destroy(_menuInstaller); _menuInstaller = null; } if (_roadsInstaller != null) { Object.Destroy(_roadsInstaller); _roadsInstaller = null; } if (_roads != null) { Object.Destroy(_roads); _roads = null; } if (_props != null) { Object.Destroy(_props); _props = null; } if (_container != null) { Object.Destroy(_container); _container = null; } }
public override void OnInstallingContent() { _container = new GameObject(REX_OBJECT_NAME); var tinyZoneBlockCreators = new [] { Alley2LBuilder.NAME, OneWay1LBuilder.NAME, ZonablePedestrianTinyGravelRoadBuilder.NAME, ZonablePedestrianTinyPavedRoadBuilder.NAME, ZonablePedestrianTinyStoneRoadBuilder.NAME }; foreach (var name in tinyZoneBlockCreators) { RoadZoneBlocksCreationManager.RegisterCustomCreator<TinyRoadZoneBlocksCreator>(name); RoadSnappingModeManager.RegisterCustomSnapping<TinyRoadSnappingMode>(name); } _menuInstaller = _container.AddInstallerComponent<MenuInstaller>(); _menuInstaller.Host = this; _roadsInstaller = _container.AddInstallerComponent<RoadsInstaller>(); _roadsInstaller.Host = this; }
internal static void Prefix(MenuInstaller __instance, FireworkItemController ____fireworkItemControllerPrefab) { var mib = __instance as MonoInstallerBase; var container = Accessors.GetDiContainer(ref mib); var vs = container.ParentContainers[0].TryResolve <VolumeSettings>(); if (!(vs is null)) { GetFireworkControllerAudioSource(ref ____fireworkItemControllerPrefab).volume = 0.6f * vs.Fireworks; } }
internal static void Postfix(ref MenuInstaller __instance) { Installer.InstallFromBase(__instance, Installer.menuInstallers, Installer.menuSiraInstallers); }
internal static void Postfix(ref MenuInstaller __instance) { Installer.InstallFromBase(__instance, Installer.gameCoreSceneSetupInstallers, Installer.gameCoreSiraInstallers); }
public override void OnReleased() { base.OnReleased(); if (_menuInstaller != null) { Object.Destroy(_menuInstaller); _menuInstaller = null; } if (_roadsInstaller != null) { Object.Destroy(_roadsInstaller); _roadsInstaller = null; } if (_roads != null) { Object.Destroy(_roads); _roads = null; } if (_props != null) { Object.Destroy(_props); _props = null; } if (_container != null) { Object.Destroy(_container); _container = null; } }