Advertisement
kadyr

Untitled

Sep 19th, 2021
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using Photon.Realtime;
  4. using UnityEngine;
  5.  
  6. public class Pistol : Gun
  7. {
  8. private Quaternion pc;
  9.  
  10. void Start()
  11. {
  12. damage = 20;
  13. cooldown = 0.5f;
  14. speed = 25f;
  15. auto = false;
  16. pc = GetComponentInParent<PlayerController>().transform.rotation;
  17. }
  18.  
  19. protected override void OnShoot()
  20. {
  21. GameObject bol = Instantiate(bullet, riffleStart.transform.position,pc);
  22. bol.GetComponent<Bullet>().setDirection(transform.forward);
  23. }
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement