private void Awake() { if (animator) { animator.enabled = false; } if (hiveGFX) { hiveGFX.SetActive(false); } hive = GetComponentInParent <BroodNest>(); shieldCollider.enabled = false; aSource = GetComponent <AudioSource>(); if (aSource) { Sound droneSFX = AudioManager.instance.GetSound(sfxName); aSource.clip = droneSFX.clip; aSource.volume = droneSFX.volume; aSource.outputAudioMixerGroup = droneSFX.mixerGroup; aSource.pitch = droneSFX.pitch; aSource.loop = droneSFX.loop; } }
private void KillBoss() { BroodNest boss = FindObjectOfType <BroodNest>(); if (boss) { boss.BossDefeated(); } }
public void SetUpBroodNest(BroodNest hiveRef) { hive = hiveRef; isAlive = true; currHealth = maxHealth; EnableBroodDelegate(); isHurt = false; IAudio player = ObjectPoolManager.Spawn(audioPlayerPrefab.gameObject, transform.position, transform.rotation).GetComponent <IAudio>(); player.SetUpAudioSource(AudioManager.instance.GetSound("BugsSplat")); player.PlayAtRandomPitch(); ObjectPoolManager.Spawn(spawnVFX, transform.position, transform.rotation); CreateTeether(); drones.SetUpAbilityData(droneData); playerTransform = GameStateManager.instance.GetPlayerTransform(); if (!playerTransform) { playerTransform = FindObjectOfType <PlayerBehaviour>().transform; } drones.playerTransform = playerTransform; pheremones.SetUpAbilityData(pheremoneData); StartCoroutine(AttackLoop()); }