// 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++; } } }
void Update() { if (animator.GetCurrentAnimatorStateInfo(0).IsName("Shoot") && animator.GetCurrentAnimatorStateInfo(0).normalizedTime >= 0.95f) { animator.Play("Normal"); } if (hp <= 0 && !ifInvincible) { cbf.InsBullet("BulletBag"); Destroy(gameObject); } if (ifReady) { if (count == 0) { Shoot(); } count++; if (count == shootWait) { count = 0; } } }
// Update is called once per frame void Update() { if (i == 0) { cbf.InsBullet("00"); } i++; if (i >= count) { i = 0; } }