// Start is called before the first frame update void Start() { _optionsManager = GameObject.Find("OptionsManager").GetComponent <VolumeOptions>(); //Pegando o audio desse componente(player) _audioSrc = GetComponent <AudioSource>(); PlayerSpawn(); _uiManager = GameObject.Find("Canvas").GetComponent <UIManager>(); //_uiManager != null if (_uiManager) { _uiManager.UpdateLives(_life); } _gameManager = GameObject.Find("GameManager").GetComponent <GameManager>(); //Quando o jogo eh iniciado, informo que ja pode dar spawn nos objetos (powerUps, enemys) _spawnManager = GameObject.Find("Spawn_Manager").GetComponent <SpawnManager>(); //Se nao for nulo if (_spawnManager) { _spawnManager.StartSpawnRoutines(); } //Ja estou dentro do player, entao so pego a fonte de audio que ele tem _audioSourceShoot = GetComponent <AudioSource>(); _audioSourceShoot.volume = _volumeEffect; }
void Start() { _optionsManager = GameObject.Find("OptionsManager").GetComponent <VolumeOptions>(); _volumeEffect = _optionsManager.GetEffectVolume(); _gameManager = GameObject.Find("GameManager").GetComponent <GameManager>(); //_audioSourcePowerUp = GetComponent<AudioSource>(); PowerUpSpawn(); }
// Start is called before the first frame update void Start() { _optionsManager = GameObject.Find("OptionsManager").GetComponent <VolumeOptions>(); _volumeEffect = _optionsManager.GetEffectVolume(); _audioSourceExplosion = GetComponent <AudioSource>(); _audioSourceExplosion.volume = _volumeEffect; _audioSourceExplosion.Play(); //Destrua esse objeto depois de 4s Destroy(this.gameObject, 4f); }
private void MusicVolumeEntrySelected(object sender, PlayerIndexEventArgs e) { musicVolumeOption++; if (musicVolumeOption > VolumeOptions.High) { musicVolumeOption = VolumeOptions.Off; } float volumeOption = (float)musicVolumeOption; float newVolume = (float)volumeOption / 3.0f; MediaPlayer.Volume = newVolume; SetMenuEntryText(); }
private void SFXVolumeEntrySelected(object sender, PlayerIndexEventArgs e) { sfxVolumeOption++; if (sfxVolumeOption > VolumeOptions.High) { sfxVolumeOption = VolumeOptions.Off; } float volumeOption = (float)sfxVolumeOption; float newVolume = (float)volumeOption / 3.0f; SoundEffect.MasterVolume = newVolume; SetMenuEntryText(); }
void Start() { data = new VolumeOptions(); dm = DataManager.Instance; string deserializedString; if (dm.loadData("soundData.txt", out deserializedString)) { data.Deserialize(deserializedString); musicVolume = data.musicVol; sfxVolume = data.sfxVol; } else { musicVolume = 70; sfxVolume = 75; } if (musicSlider) { musicSlider.value = musicVolume; sfxSlider.value = sfxVolume; AkSoundEngine.SetRTPCValue("music_volume", musicSlider.value); AkSoundEngine.SetRTPCValue("sfx_volume", sfxSlider.value); } else { AkSoundEngine.SetRTPCValue("music_volume", musicVolume); AkSoundEngine.SetRTPCValue("sfx_volume", sfxVolume); } /*musicSlider.value = musicVolume; * sfxSlider.value = sfxVolume;*/ data.sfxVol = sfxVolume; data.musicVol = musicVolume; dm.saveData("soundData.txt", data.Serialize()); }
/// <inheritdoc/> public void Normalize() { switch (Type) { case ServiceMountType.Bind: BindOptions = BindOptions ?? new ServiceBindOptions(); BindOptions.Normalize(); break; case ServiceMountType.Tmpfs: TmpfsOptions = TmpfsOptions ?? new ServiceTmpfsOptions(); TmpfsOptions.Normalize(); break; case ServiceMountType.Volume: VolumeOptions = VolumeOptions ?? new ServiceVolumeOptions(); VolumeOptions.Normalize(); break; } }
// Start is called before the first frame update void Start() { _optionsManager = GameObject.Find("OptionsManager").GetComponent <VolumeOptions>(); //Pegando o audio desse componente(camera) _audioSrc = GetComponent <AudioSource>(); }
void Start() { _optionsManager = GameObject.Find("OptionsManager").GetComponent <VolumeOptions>(); _gameManager = GameObject.Find("GameManager").GetComponent <GameManager>(); }
private static BaseActionClass InitializeAction(string category, string actionName) { BaseActionClass action = null; switch (category) { case InternetOptions.NAME: if (category != actionName) { action = new InternetOptions(actionName); } else { action = new InternetOptions(); } break; case WinampOptions.NAME: if (category != actionName) { action = new WinampOptions(actionName); } else { action = new WinampOptions(); } break; case MediaControl.NAME: if (category != actionName) { action = new MediaControl(actionName); } else { action = new MediaControl(); } break; case WindowOptions.NAME: if (category != actionName) { action = new WindowOptions(actionName); } else { action = new WindowOptions(); } break; case WindowsShell.NAME: if (category != actionName) { action = new WindowsShell(actionName); } else { action = new WindowsShell(); } break; case KeystrokesOptions.NAME: if (category != actionName) { action = new KeystrokesOptions(actionName); } else { action = new KeystrokesOptions(); } break; case SpecialOptions.NAME: if (category != actionName) { action = new SpecialOptions(actionName); } else { action = new SpecialOptions(); } break; case AppGroupOptions.NAME: if (category != actionName) { action = new AppGroupOptions(actionName); } else { action = new AppGroupOptions(); } break; case ExtrasOptions.NAME: if (category != actionName) { action = new ExtrasOptions(actionName); } else { action = new ExtrasOptions(); } break; case VolumeOptions.NAME: if (category != actionName) { action = new VolumeOptions(actionName); } else { action = new VolumeOptions(); } break; default: //if (category != actionName) // action = new BaseActionClass(actionName); //else action = new BaseActionClass(); break; } return(action); }