// Update is called once per frame void Update() { if (count == pauseTime) { count = 0; } if (count != 0) { count++; } if (count == 0) { if (Input.GetButton("Fire1")) { //SoundEffectFunction.Play (gameObject, __arglist("bullet0", "bullet1", "bullet2")); SoundEffectFunction.Play(gameObject, arsenal.bullets[0].sounds); createBullet.InsBullet(arsenal.bullets[0].bullet); if (arsenal.bullets [0].number > 0) { arsenal.Consume(); } count++; } } }
public override void Hited() { EventManager.shakeCamera(); //SoundEffectFunction.Play (gameObject, sounds,0.5f); SoundEffectFunction.Play(gameObject, hitesSounds); ExpressionControl.ChangeToWarning(); }
void OnTriggerEnter(Collider other) { if (other.gameObject.GetComponent <Arsenal>() != null) { SoundEffectFunction.Play(gameObject, sound); other.gameObject.GetComponent <Arsenal> ().Add(bulletName, soundsName, number); Destroy(gameObject); } }
public override void Hited() { EventManager.shakeCamera(); if (shake == null) { shake = StartCoroutine(WhiteShake(time)); } SoundEffectFunction.Play(gameObject, hitesSounds); }
private void Shoot() { animator.Play("Shoot"); SoundEffectFunction.Play(gameObject, shootSounds); for (int i = 0; i < muzzles.Length; i++) { muzzles [i].GetComponent <CreateBulletFunc> ().InsBullet(bullet); } }
public static void Play(GameObject g, float volume, __arglist) { ArgIterator args = new ArgIterator(__arglist); List <String> sounds = new List <String> (); while (args.GetRemainingCount() > 0) { sounds.Add((string)TypedReference.ToObject(args.GetNextArg())); } String[] soundsName = sounds.ToArray(); SoundEffectFunction.Play(g, soundsName, volume); }
void OnTriggerEnter(Collider other) { if (other.GetComponent <Vehicle> () != null) { other.GetComponent <Vehicle> ().Hited(); if (other.GetComponent <Vehicle> ().ifInvincible == false) { other.GetComponent <Vehicle> ().ChangeHp(damage); } if (other.GetComponent <Vehicle> ().GetType() != typeof(Border)) { if (explode != null) { ParticleEffectFunction.Show(gameObject, explode); } } if (sound.Length != 0) { SoundEffectFunction.Play(gameObject, sound); } } Destroy(gameObject); }
public void test() { string[] names = { "bullet0", "bullet1" }; SoundEffectFunction.Play(gameObject, names); }