kadyr

Untitled

Oct 16th, 2021
683
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Pistol : Gun
  2. {
  3.     void Start()
  4.     {
  5.         speed = 20f;
  6.         damage = 25;
  7.         coolDown = 1.25f;
  8.     }
  9.  
  10.     protected override void OnShoot()
  11.     {
  12.         var bul = Instantiate(bullet, riffleStart.transform.position,
  13.             transform.rotation);
  14.         bul.GetComponent<Bullet>().setDirection(transform.forward);
  15.         bul.GetComponent<Bullet>().MakeNewBullet(20,25);
  16.     }
  17. }
RAW Paste Data