//================================================================================================== void Start() { _sounds = soundsLocal; _sfxSource = new AudioSource[4]; for (int loop = 0; loop < 4; loop++) { _sfxSource[loop] = gameObject.AddComponent <AudioSource>( ) as AudioSource; _sfxSource[loop].volume = 1; _sfxSource[loop].loop = false; _sfxSource[loop].ignoreListenerVolume = true; } _shotsArray = new GameObject[4]; _shotsScript = new ShotBrain[4]; for (int loop = 0; loop < 4; loop++) { _shotsArray[loop] = Instantiate(shotPrefab) as GameObject; _shotsScript[loop] = _shotsArray[loop].GetComponent <ShotBrain>(); } _shieldHit = new EchoPFX("RenderGroup:0", "ShieldHit"); _shockWave = new EchoPFX("RenderGroup:0", "Shockwave"); _musicSource = gameObject.AddComponent <AudioSource>( ) as AudioSource; _musicSource.clip = DemoSong; _musicSource.volume = 1; _musicSource.ignoreListenerVolume = true; _musicSource.loop = true; _musicSource.Play(); }
void Start() { _fxDistortion = new EchoPFX("RenderGroup:0", "Distortion"); _fxThermal = new EchoPFX("RenderGroup:0", "Thermal"); _fxNightVision = new EchoPFX("RenderGroup:0", "NightVision"); }
public override void Awake() { _fxID = new EchoPFX(renderGroupName.Value, effectName.Value); }