protected override void OnStart() { burstIndicator = GetComponentInChildren <BurstIndicator>(); burstIndicator.SetTimeToFill(MIN_BURST_TIME); alertSource = AudioManager.AddAudioSource(gameObject, null, 1, true, AudioManager.Instance.sfxGroup); infectSource = AudioManager.AddAudioSource(gameObject, infectSound, 0.6f, true, AudioManager.Instance.sfxGroup); }
void Start() { spriteRenderer = GetComponentInChildren <SpriteRenderer>(); pounceChargeAudioSource = AudioManager.AddAudioSource(gameObject, pounceChargeSound, 1f, true, AudioManager.Instance.sfxGroup); Hide(); }
protected override void OnStart() { screechAudioSource = AudioManager.AddAudioSource(gameObject, screechSound, .2f, true, AudioManager.Instance.sfxGroup); jumpAudioSource = AudioManager.AddAudioSource(gameObject, jumpSound, 1, true, AudioManager.Instance.sfxGroup); pounceAudioSource = AudioManager.AddAudioSource(gameObject, pounceSound, 0.5f, true, AudioManager.Instance.sfxGroup); wallClingAudioSource = AudioManager.AddAudioSource(gameObject, wallClingSound, .5f, true, AudioManager.Instance.sfxGroup); pounceSecondarySoundSet = gameObject.AddComponent <RandomSoundSet>(); pounceSecondarySoundSet.sounds = pounceSecondarySounds; pounceSecondarySoundSet.rolloff = true; pounceSecondarySoundSet.volume = 0.25f; infectRangeIndicator = GetComponentInChildren <InfectRangeIndicator>(); if (HasAuthority()) { infectRangeIndicator.SetOriginTransform(transform); if (CharacterSpawner.parasiteData.isVamparasite) { ChangeToVampColour(); } } else { infectRangeIndicator.enabled = false; } flashColourRotator = new ColourRotator(flashColours); }
private void PreloadResource(GameObject obj, SkillInstance instance) { m_IsResourcePreloaded = true; AudioManager audio_mgr = instance.CustomDatas.GetData <AudioManager>(); if (audio_mgr == null) { audio_mgr = new AudioManager(); instance.CustomDatas.AddData <AudioManager>(audio_mgr); audio_mgr.AddAudioSource(DefaultAudioName, obj.GetComponent <AudioSource>()); } m_AudioSource = audio_mgr.GetAudioSource(m_Name); if (m_AudioSource == null) { m_AudioSource = CreateNewAudioSource(obj); if (m_AudioSource != null) { audio_mgr.AddAudioSource(m_Name, m_AudioSource); } else { m_AudioSource = obj.GetComponent <AudioSource>(); } } }
void Start() { soundManager = GameObject.Find("SoundManager").GetComponent <AudioManager>(); soundManager.AddAudioSource(this); volume = originalVolume; UpdateSound(); }
void Awake() { callFields = new List <ElevatorCallField>(); elevatorArrivedSource = AudioManager.AddAudioSource(gameObject, elevatorArrivedSound, .5f, true, AudioManager.Instance.sfxGroup); elevatorArrivedSource.dopplerLevel = 0; // Sounds weird and low quality with doppler Transform floorTransform = GetComponentInChildren <BoxCollider2D>().transform; physicsEntity = new PlatformPhysicsEntity(floorTransform, .05f, 1f); }
void Start() { spriteRenderer = GetComponentInChildren <SpriteRenderer>(); spriteMask = GetComponentInChildren <SpriteMask>(); animator = GetComponentInChildren <Animator>(); // Hide at start spriteRenderer.color = Color.clear; burstChargeAudioSource = AudioManager.AddAudioSource(gameObject, burstChargeSound); burstReadyAudioSource = AudioManager.AddAudioSource(gameObject, burstReadySound); }
public void Create(int audio_count, bool is_loop = false, float audio_volume = 1) { while (audio_count > 0) { AudioSource audio_sources = m_AudioManager.AddAudioSource(); audio_sources.loop = is_loop; audio_sources.volume = audio_volume; m_AudioSources.Enqueue(audio_sources); audio_count--; } }
void PlayPopSound() { // Create gameobject to host the sound // If we use the NPC, the sound will be cut off immediately since the NPC is destroyed GameObject soundObject = new GameObject(); soundObject.transform.position = transform.position; soundObject.name = "NPC Pop Sound"; AudioManager.AddAudioSource(soundObject, popSound, 0.5f, true).Play(); // Destroy soundObject once the sound is done playing // Attach this coroutine to MatchManager since this NPC will be destroyed MatchManager.Instance.StartCoroutine(Utility.WaitXSeconds(popSound.length, () => { Destroy(soundObject); })); }
void Start() { //Setup Input inputManager = new PlayerInputManager( new PlayerInputBindings(), new MouseFollowInputHandler(Camera.main) ); //Setup Shooting ObjectPool pool = new ObjectPool(Resources.Load <GameObject>("projectile"), 20, true); shootAbility = new ShootAbility(transform, pool); inputManager.AddActionToBinding("shoot", OnShoot); //Start Audio System audioManager = new AudioManager(); AudioSource source = GetComponent <AudioSource>(); audioManager.AddAudioSource("SFX", source); }
protected override void OnStart() { orbs = new Queue <Orb>(); // Cache reference to orb beam range manager orbBeamRangeManager = GetComponentInChildren <OrbBeamRangeManager>(); if (!isNpcControlled && HasAuthority()) { // Show orb UI manager to display how many orbs are remaining orbUiManager = UiManager.Instance.orbUiManager; orbUiManager.gameObject.SetActive(true); orbUiManager.Initialize(); cantPlaceOrbAudioSource = AudioManager.AddAudioSource(gameObject, cantPlaceOrbSound, .5f, false, AudioManager.Instance.sfxGroup); } else { orbBeamRangeManager.shouldShowMarkers = false; } throwOrbAudioSource = AudioManager.AddAudioSource(gameObject, throwOrbSound, 1, true, AudioManager.Instance.sfxGroup); recallOrbAudioSource = AudioManager.AddAudioSource(gameObject, recallSound, 0.5f, true, AudioManager.Instance.sfxGroup); backpackAudioSource = AudioManager.AddAudioSource(gameObject, backpackSound, 1, true, AudioManager.Instance.sfxGroup); animationSounds = GetComponentInChildren <HunterAnimationSounds>(); backpackTransform = Utility.GetChildWithTag("OrbDestination", gameObject).transform; }
void Start() { jumpAudioSource = AudioManager.AddAudioSource(gameObject, jumpSound, .5f, true, AudioManager.Instance.sfxGroup); wallClingAudioSource = AudioManager.AddAudioSource(gameObject, wallClingSound, 1, true, AudioManager.Instance.sfxGroup); wallSlipAudioSource = AudioManager.AddAudioSource(gameObject, wallSlipSound, 1, true, AudioManager.Instance.sfxGroup); }
void Start() { hoverAudioSource = AudioManager.AddAudioSource(gameObject, hoverSound, 0.25f, false, AudioManager.Instance.uiGroup); clickAudioSource = AudioManager.AddAudioSource(gameObject, clickSound, 0.75f, false, AudioManager.Instance.uiGroup); }
void Start() { // CLEANUP: specific to burst indicator drops source = AudioManager.AddAudioSource(gameObject, clip, 1, rolloff, AudioManager.Instance.heartbeatGroup); }
void Start() { audioSource = AudioManager.AddAudioSource(gameObject, null, volume, rolloff, AudioManager.Instance.sfxGroup); }