Advertisement
gaidzinski07

void Atirar()

Sep 7th, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1.     [PunRPC]
  2.     public virtual void Atirar(Vector3 pos, Quaternion dir)
  3.     {
  4.         if (balasNoPente > 0 && canFire && !recarregando)
  5.         {
  6.             balasNoPente--;
  7.             GameObject b = Instantiate(bala, pos, dir);
  8.             b.GetComponent<Bullet>().dono = nomePlayer;
  9.             precisao += precisaoSomada;
  10.             canFire = false;
  11.             GetComponentInParent<SimpleMouseLook>().setVert(PropRecoil().y);
  12.             GetComponentInParent<SimpleMouseLook>().setHor(PropRecoil().x);
  13.             atirando = true;
  14.             if(fire != null)
  15.             {
  16.                 fire.Emit(1);
  17.             }
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement