void Start() { auBank = GameObject.Find("_AudioBank").GetComponent <AudioBank>(); currentCameraStart = Camera.main.transform.position; player = GameObject.Find("Player"); currentSpawnPoint = gameStart; }
void Awake() { playerRB = GameObject.Find("Player").GetComponent <Rigidbody>(); audioBank = GameObject.Find("_AudioBank").GetComponent <AudioBank>(); textBank = GameObject.Find("_TextBank").GetComponent <TextBank>(); status = GameObject.Find("Player").GetComponent <PlayerStatus>(); }
public void playAudioClip(SFXClip clipName, Vector3 position, float volume = 1.0f) { if (audioBank == null) { gameObject.AddComponent("AudioBank"); audioBank = GetComponent <AudioBank>(); } audioBank.playClipAtPoint(clipName, position, volume); }
void Start() { audioBank = GameObject.Find("_AudioBank").GetComponent <AudioBank>(); prefabBank = GameObject.Find("_PrefabBank").GetComponent <PrefabBank>(); player = GameObject.FindGameObjectWithTag("Player"); enemy = GetComponent <Enemy>(); rb = GetComponent <Rigidbody>(); StartCoroutine(BeginFiring()); }
public void playAudioClip(SFXClip clipName, float volume = 1.0f) { if (audioBank == null) { gameObject.AddComponent("AudioBank"); audioBank = GetComponent <AudioBank>(); } audioBank.playAudioClip(clipName, volume); }
void Start() { gameController = GameObject.Find("_GameController").GetComponent <GameController>(); audioBank = GameObject.Find("_AudioBank").GetComponent <AudioBank>(); textBank = GameObject.Find("_TextBank").GetComponent <TextBank>(); controller = GetComponent <PlayerController>(); currHealth = maxHealth; textBank.healthText.text = "Health: " + currHealth; initialHealthFrac = healthBar.transform.localScale.x; }
void Start() { health = maxHealth; weapon = null; if (transform.Find(weaponName) && transform.Find(weaponName).gameObject != gameObject) { weapon = transform.Find(weaponName).gameObject; weapon.SetActive(false); } gameController = GameObject.Find("Game Controller").GetComponent <GameController>(); auBank = GameObject.Find("_AudioBank").GetComponent <AudioBank>(); }
public static void Unload(AudioBankLink bankLink) { AudioBank bank = InstanceFinder.DataManager.GetLoadedBank(bankLink); if (bank != null) { for (int i = 0; i < bank.Clips.Count; i++) { (bank.Clips[i].Node.NodeData as AudioData).Clip = null; } Resources.UnloadUnusedAssets(); } }
/// <summary> /// Initializes this emitter. This is either called from the audio engine if the emitter is static, or from a game object in the world if it's spawned dynamically. /// </summary> public void Initialize(bool dynamic) { if (!string.IsNullOrEmpty(audioDataFileName)) { audioData = AudioBank.GetAudioData(audioDataFileName); outputRateFactor = (float)audioData.Frequency / AudioSettings.outputSampleRate; isCreatedDynamically = dynamic; if (is3DSound) { leftPan = 0.0f; rightPan = 0.0f; } } }
void OnEnable() { if (m_audioController == null) { AudioBank bank = Resources.Load <AudioBank> (k.Resources.AUDIO_BANK); if (bank != null) { m_audioController = new AudioController(bank); m_audioController.subscribe(); } float musicVolume = PlayerPrefs.GetFloat("MusicVolume", 1); EventManager.Instance.Raise(new SoundEvents.UpdateGroupVolume(SoundEvents.Group.MUSIC, musicVolume)); float soundVolume = PlayerPrefs.GetFloat("SoundVolume", 1); EventManager.Instance.Raise(new SoundEvents.UpdateGroupVolume(SoundEvents.Group.SOUND, soundVolume)); } }
//private Camera mainCamera; //private PreStoryImages image; void Start() { //image = FindObjectOfType<PreStoryImages>(); //mainCamera = FindObjectOfType<Camera>(); hasPlayed1 = false; hasPlayed2 = false; hasPlayed3 = false; hasPlayed4 = false; hasPlayed5 = false; hasPlayed6 = false; hasPlayed7 = false; hasPlayed8 = false; hasPlayed9 = false; audioBank = FindObjectOfType<AudioBank>(); currText = GetComponent<Text>(); textIndex = 0; }
void Start() { playerActions = new MyCharacterActions(); playerController = GameObject.Find("Player").GetComponent <PlayerController>(); healthBar.SetActive(false); Time.timeScale = 1f; audioBank = GameObject.Find("_AudioBank").GetComponent <AudioBank>(); textBank = GameObject.Find("_TextBank").GetComponent <TextBank>(); beginText = textBank.beginText; quitText = textBank.quitText; restartText = textBank.restartText; textBank.healthText.enabled = true; textBank.currentScoreText.enabled = true; StartCoroutine(KamikazeSpawnIncreases()); StartCoroutine(StarshipSpawnIncreases()); StartCoroutine(DisclaimerTimer()); BeginGame(); // StartCoroutine(AcquireInputType()); }
// Use this for initialization void Start() { primaryAudioManager = this; if (phazingMusic != null) { music = phazingMusic.GetComponent <AudioSource>(); anim = phazingMusic.GetComponent <Animator>(); cml = phazingMusic.GetComponent <CleanMusicLoop>(); } if (constantMusic != null) { cMusic = constantMusic.GetComponent <AudioSource>(); } if (MapGenerator.mg != null) { audioBank = MapGenerator.mg.audioBank; } else { gameObject.AddComponent("AudioBank"); audioBank = GetComponent <AudioBank>(); } }
public AudioController(AudioBank bank) { AudioBank = bank; }
void Start() { prefabBank = GameObject.Find("_PrefabBank").GetComponent <PrefabBank>(); audioBank = GameObject.Find("_AudioBank").GetComponent <AudioBank>(); playerRB = GameObject.Find("Player").GetComponent <Rigidbody>(); }
public void BankIsLoaded(AudioBank bank) { LoadedBanks.Add(bank); }