Askor

Uzi

Jan 7th, 2022
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Uzi : Weapon
  6. {
  7.     public override IEnumerator Shoot(Transform shootPoint)
  8.     {
  9.         int countOfBurstShots = 5;
  10.         var fireRate = new WaitForSeconds(0.1f);
  11.  
  12.         for (int i = 0; i < countOfBurstShots; i++)
  13.         {
  14.             Instantiate(Bullet, shootPoint.position, Quaternion.identity);
  15.  
  16.             yield return fireRate;
  17.         }
  18.     }
  19. }
  20.  
Add Comment
Please, Sign In to add comment