public override void NetworkStart() { base.NetworkStart(); cameraRef = GetComponent <Camera>(); networkObject.UpdateInterval = 100; // If this is not our camera then we should not render using it if (!networkObject.IsOwner) { cameraRef.enabled = false; } else { playerCamera = this; } networkObject.position = transform.position; networkObject.SnapInterpolations(); if (!networkObject.IsOwner) { return; } }
public frmChat() { InitializeComponent(); this.Disposed += frmCam_Disposed; this.Load += frmCam_Load; this.KeyPress += frmCam_KeyPress; CvInvoke.UseOpenCL = false; movement = new CameraMovement("COM3"); movement.Response += movement_Response; netCam = new NetCam(); netCam.setPreviewPictureBox(pictureBox1); netCam.setPictureBox(pictureBox2); netAudio = new NetAudio(); netAudio.Result += netAudio_Result; chat = new Chat(2524); chat.Receive += chat_Receive; chat.ClientConnected += chat_ClientConnected; chat.ClientDisconnected += chat_Disconnected; }
protected override void NetworkStart() { //BeardedManStudios.Forge.Logging.BMSLog.Log("ID is " + networkObject.NetworkId); cameraRef = GetComponent <Camera>(); networkObject.UpdateInterval = 100; // If this is not our camera then we should not render using it if (!networkObject.IsOwner) { cameraRef.enabled = false; } else { playerCamera = this; } if (!networkObject.IsOwner) { return; } networkObject.position = transform.position; }