void Update()
 {
     if (Input.GetKeyDown(KeyCode.C))
     {
         shooter.ShootBullet(direction);
     }
 }
Example #2
0
 private IEnumerator Fire()
 {
     for (int i = 0; i < (fireMode == FireMode.BURST ? 3 : 1); i++)
     {
         shooter.ShootBullet(movement.DirectionToPlayer);
         soundMod.PlayModClip(fireSound);
         bulletTimer = Random.Range(-.5f, .5f);
         yield return(new WaitForSeconds(.1f));
     }
 }
Example #3
0
 /// <summary>
 /// Shooter fires either a Bullet or a Charm (formerly called Yarnball).
 /// </summary>
 private void FireShooter()
 {
     isCooldown = true;
     this.rapidfireCounter++;
     if (this.rapidfireCounter == 5)
     {
         this.rapidfireCounter = 0;
     }
     bulletShooter.ShootBullet(this.damage);
     StartCoroutine(Cooldown());
 }