Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using Photon.Pun;
- public class NetworkMove : MonoBehaviour, IPunObservable
- {
- PhotonView _photonView;
- public bool finish;
- void Start()
- {
- if (!_photonView.IsMine)
- {
- GetComponent<PlayerLook>().enabled = false;
- GetComponent<GuyMove>().enabled = false;
- GetComponentInChildren<Camera>().gameObject.SetActive(false);
- }
- }
- public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
- {
- if (stream.IsWriting)
- stream.SendNext(finish);
- else
- finish = (bool)stream.ReceiveNext();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement