Advertisement
Guest User

SendInfo.cs

a guest
Aug 3rd, 2018
106
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. using System.Collections;
  3.  
  4. public class SendInfo : MonoBehaviour {
  5.  
  6.  
  7. void Start () {
  8.  
  9. }
  10.  
  11.  
  12. void Update () {
  13.  
  14. bool RMB = Input.GetMouseButtonDown (1);
  15.  
  16. if (RMB) {
  17.  
  18. RaycastHit hit;
  19. Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
  20.  
  21. if (Physics.Raycast(ray, out hit) && hit.transform.tag == "Ground"){
  22.  
  23. this.GetComponent<PhotonView>().RPC("RecievedMove", PhotonTargets.All, hit.point);
  24.  
  25. }
  26.  
  27.  
  28. }
  29.  
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement