private void Stop(HangarAmbientSoundListenerNode soundListener) { HangarAmbientSoundController hangarAmbientSoundController = soundListener.hangarAmbientSoundController.HangarAmbientSoundController; soundListener.Entity.RemoveComponent <HangarAmbientSoundControllerComponent>(); hangarAmbientSoundController.Stop(); }
private HangarAmbientSoundController PrepareNewEffect(InitialHangarAmbientSoundNode hangar, SoundListenerNode soundListener) { HangarAmbientSoundController controller2 = Object.Instantiate <HangarAmbientSoundController>(hangar.hangarAmbientSoundPrefab.HangarAmbientSoundController); Transform transform = controller2.transform; transform.parent = soundListener.soundListener.transform; transform.localRotation = Quaternion.identity; transform.localPosition = Vector3.zero; return(controller2); }