Advertisement
kadyr

Untitled

Oct 16th, 2021
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. using UnityEngine;
  2. public class Pistol : Gun
  3. {
  4. void Start()
  5. {
  6. speed = 20f;
  7. damage = 25;
  8. coolDown = 1.25f;
  9. }
  10.  
  11. protected override void OnShoot()
  12. {
  13. var bul = Instantiate(bullet, riffleStart.transform.position,
  14. riffleStart.transform.rotation);
  15. bul.GetComponent<Bullet>().setDirection(GetComponentInParent<PlayerController>().transform.forward);
  16. bul.GetComponent<Bullet>().MakeNewBullet(20,25);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement